File 1833-Suppress-warnings-about-obsolete-boolean-operators-i.patch of Package erlang
From 0700b669e440f14e1c73c676c67014de9e6615ad Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Tue, 25 Nov 2025 18:39:39 +0100
Subject: [PATCH 3/3] Suppress warnings about obsolete boolean operators in
test suites
---
lib/ssh/test/ssh_options_SUITE.erl | 1 +
lib/ssh/test/ssh_pubkey_SUITE.erl | 2 ++
lib/stdlib/test/beam_lib_SUITE.erl | 2 ++
lib/stdlib/test/binary_module_SUITE.erl | 2 ++
lib/stdlib/test/binref.erl | 21 +++++++++++++++++++++
lib/stdlib/test/erl_eval_SUITE.erl | 3 +++
lib/stdlib/test/erl_lint_SUITE.erl | 10 ++++++----
lib/stdlib/test/erl_pp_SUITE.erl | 2 ++
lib/stdlib/test/ets_SUITE.erl | 2 ++
lib/stdlib/test/id_transform_SUITE.erl | 4 +++-
lib/stdlib/test/io_SUITE.erl | 2 ++
lib/stdlib/test/ms_transform_SUITE.erl | 2 ++
lib/stdlib/test/run_old_pcre1_tests.erl | 2 ++
lib/stdlib/test/run_pcre_tests.erl | 2 ++
lib/stdlib/test/select_SUITE.erl | 2 ++
lib/stdlib/test/supervisor_SUITE.erl | 2 ++
16 files changed, 56 insertions(+), 5 deletions(-)
diff --git a/lib/ssh/test/ssh_options_SUITE.erl b/lib/ssh/test/ssh_options_SUITE.erl
index 675157011d..0b1d37dd8a 100644
--- a/lib/ssh/test/ssh_options_SUITE.erl
+++ b/lib/ssh/test/ssh_options_SUITE.erl
@@ -26,6 +26,7 @@
%%% This test suite tests different options for the ssh functions
+-compile(nowarn_obsolete_bool_op).
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
diff --git a/lib/ssh/test/ssh_pubkey_SUITE.erl b/lib/ssh/test/ssh_pubkey_SUITE.erl
index 03bd97b6e1..5d47510962 100644
--- a/lib/ssh/test/ssh_pubkey_SUITE.erl
+++ b/lib/ssh/test/ssh_pubkey_SUITE.erl
@@ -22,6 +22,8 @@
%%
-module(ssh_pubkey_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
%% Note: This directive should only be used in test suites.
-export([
suite/0,
diff --git a/lib/stdlib/test/beam_lib_SUITE.erl b/lib/stdlib/test/beam_lib_SUITE.erl
index 738e5cf3cd..3e29c57173 100644
--- a/lib/stdlib/test/beam_lib_SUITE.erl
+++ b/lib/stdlib/test/beam_lib_SUITE.erl
@@ -23,6 +23,8 @@
%%-define(debug, true).
+-compile(nowarn_obsolete_bool_op).
+
-ifdef(debug).
-define(format(S, A), io:format(S, A)).
-define(line, put(line, ?LINE), ).
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl
index 6689a93e37..6ad9d9ab3d 100644
--- a/lib/stdlib/test/binary_module_SUITE.erl
+++ b/lib/stdlib/test/binary_module_SUITE.erl
@@ -21,6 +21,8 @@
%%
-module(binary_module_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
-export([all/0, suite/0,
interesting/1,scope_return/1,random_ref_comp/1,random_ref_sr_comp/1,
random_ref_fla_comp/1,parts/1, bin_to_list/1, list_to_bin/1,
diff --git a/lib/stdlib/test/binref.erl b/lib/stdlib/test/binref.erl
index c92a716dba..055ddf2b0c 100644
--- a/lib/stdlib/test/binref.erl
+++ b/lib/stdlib/test/binref.erl
@@ -1,3 +1,23 @@
+%% %CopyrightBegin%
+%%
+%% SPDX-License-Identifier: Apache-2.0
+%%
+%% Copyright Ericsson AB 2025. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+
-module(binref).
-export([compile_pattern/1,match/2,match/3,matches/2,matches/3,
@@ -7,6 +27,7 @@
longest_common_prefix/1,longest_common_suffix/1,bin_to_list/1,
bin_to_list/2,bin_to_list/3,list_to_bin/1]).
+-compile(nowarn_obsolete_bool_op).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% compile_pattern, a dummy
diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl
index 3393f900b1..9b8ecbbe4a 100644
--- a/lib/stdlib/test/erl_eval_SUITE.erl
+++ b/lib/stdlib/test/erl_eval_SUITE.erl
@@ -20,6 +20,9 @@
%% %CopyrightEnd%
-module(erl_eval_SUITE).
+
+-compile(nowarn_obsolete_bool_op).
+
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2,
init_per_group/2,end_per_group/2]).
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index b3612e9af7..b1fc026c91 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -21,6 +21,8 @@
%%
-module(erl_lint_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
%%-define(debug, true).
-ifdef(debug).
@@ -623,7 +625,7 @@ unused_vars_warn_fun(Config) when is_list(Config) ->
(C == <<A:A>>) and (<<17:B>> == D)
end.
">>,
- [warn_unused_vars],
+ [warn_unused_vars,nowarn_obsolete_bool_op],
{warnings,[{{1,24},erl_lint,{unused_var,'A'}},
{{2,23},erl_lint,{unused_var,'A'}},
{{2,23},erl_lint,{shadowed_var,'A','fun'}},
@@ -1906,7 +1908,7 @@ guard(Config) when is_list(Config) ->
t3(A) when is_tuple(A) or is_tuple(A) ->
is_tuple.
">>,
- [nowarn_obsolete_guard],
+ [nowarn_obsolete_guard,nowarn_obsolete_bool_op],
[]}],
[] = run(Config, Ts),
Ts1 = [{guard5,
@@ -1959,7 +1961,7 @@ guard(Config) when is_list(Config) ->
[X || X <- [1,#apa{},3], (3+is_record(X, apa)) or
(is_record(X, apa)*2)].
">>,
- [],
+ [nowarn_obsolete_bool_op],
[]},
{guard8,
<<"t(A) when erlang:is_foobar(A) -> ok;
@@ -3033,7 +3035,7 @@ otp_5878(Config) when is_list(Config) ->
{{5,30},erl_lint,illegal_guard_expr},
{{7,30},erl_lint,illegal_guard_expr}],
[]} =
- run_test2(Config, Ill2, [warn_unused_record]),
+ run_test2(Config, Ill2, [warn_unused_record,nowarn_obsolete_bool_op]),
Ill3 = <<"t() -> ok.">>,
{errors,[{{1,1},erl_lint,undefined_module}],[]} =
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index 4ee4fe1a3f..4b00afe5b5 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -24,6 +24,8 @@
%%%-----------------------------------------------------------------
-module(erl_pp_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
%%-define(debug, true).
-ifdef(debug).
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index c7f63b98df..976eff3ff8 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -21,6 +21,8 @@
%%
-module(ets_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
-export([default/1,setbag/1,badnew/1,verybadnew/1,named/1,keypos2/1,
diff --git a/lib/stdlib/test/id_transform_SUITE.erl b/lib/stdlib/test/id_transform_SUITE.erl
index d133df6a5a..ebe9b90382 100644
--- a/lib/stdlib/test/id_transform_SUITE.erl
+++ b/lib/stdlib/test/id_transform_SUITE.erl
@@ -23,7 +23,9 @@
-author('pan@erix.ericsson.se').
-include_lib("kernel/include/file.hrl").
-
+
+-compile(nowarn_obsolete_bool_op).
+
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
id_transform/1]).
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index 728a90cc13..32ac44e419 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -21,6 +21,8 @@
%%
-module(io_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
-export([all/0, suite/0]).
-export([error_1/1, float_g/1, float_w/1, otp_5403/1, otp_5813/1, otp_6230/1,
diff --git a/lib/stdlib/test/ms_transform_SUITE.erl b/lib/stdlib/test/ms_transform_SUITE.erl
index adc1053c3c..679d438c46 100644
--- a/lib/stdlib/test/ms_transform_SUITE.erl
+++ b/lib/stdlib/test/ms_transform_SUITE.erl
@@ -22,6 +22,8 @@
-module(ms_transform_SUITE).
-author('pan@erix.ericsson.se').
+-compile(nowarn_obsolete_bool_op).
+
-include_lib("common_test/include/ct.hrl").
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/run_old_pcre1_tests.erl b/lib/stdlib/test/run_old_pcre1_tests.erl
index fc20ff056a..2830cc1451 100644
--- a/lib/stdlib/test/run_old_pcre1_tests.erl
+++ b/lib/stdlib/test/run_old_pcre1_tests.erl
@@ -22,6 +22,8 @@
-module(run_old_pcre1_tests).
-export([test/1,gen_split_test/1,gen_repl_test/1]).
+-compile(nowarn_obsolete_bool_op).
+
test(RootDir) ->
put(verbose,false),
erts_debug:set_internal_state(available_internal_state,true),
diff --git a/lib/stdlib/test/run_pcre_tests.erl b/lib/stdlib/test/run_pcre_tests.erl
index 5327d3c9c2..e0c5df1123 100644
--- a/lib/stdlib/test/run_pcre_tests.erl
+++ b/lib/stdlib/test/run_pcre_tests.erl
@@ -22,6 +22,8 @@
-module(run_pcre_tests).
-export([test/1,gen_split_test/1,gen_repl_test/1]).
+-compile(nowarn_obsolete_bool_op).
+
-define(is_hex_char(C),(((C >= $0) and (C =< $9)) or ((C >= $A) and (C =< $F)) or ((C >= $a) and (C =< $f)))).
-define(SPACE,32). % space character ($ )
diff --git a/lib/stdlib/test/select_SUITE.erl b/lib/stdlib/test/select_SUITE.erl
index 8b49f4b815..b69c0e05a6 100644
--- a/lib/stdlib/test/select_SUITE.erl
+++ b/lib/stdlib/test/select_SUITE.erl
@@ -23,6 +23,8 @@
-module(select_SUITE).
-author('pan@erix.ericsson.se').
+-compile(nowarn_obsolete_bool_op).
+
-export([test/0]).
%%
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index 9b1dbc72b8..585737636e 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -23,6 +23,8 @@
-module(supervisor_SUITE).
+-compile(nowarn_obsolete_bool_op).
+
-include_lib("common_test/include/ct.hrl").
%% Testserver specific export
--
2.51.0