From 4175df945b048e5aeed932baf36d22ba89310121 Mon Sep 17 00:00:00 2001 From: rillig Date: Fri, 7 Jul 2023 19:45:22 +0000 Subject: lint: warn about function definitions without header declaration The existing warning was only issued for function declarations, not for function definitions. The interesting change in the tests is in msg_351.c. Many other tests use non-static functions due to their syntactic brevity. In these tests, the warning is disabled individually, to allow new functions to be added without generating warning 351. --- tests/usr.bin/xlint/lint1/c11_atomic.c | 4 ++-- tests/usr.bin/xlint/lint1/c11_generic_expression.c | 5 +++-- tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c | 4 ++-- tests/usr.bin/xlint/lint1/d_alignof.c | 4 +++- tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c | 4 +++- tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c | 4 +++- tests/usr.bin/xlint/lint1/d_c99_union_cast.c | 4 ++-- tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c | 4 +++- tests/usr.bin/xlint/lint1/d_compound_literals1.c | 4 +++- tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c | 4 +++- tests/usr.bin/xlint/lint1/d_fold_test.c | 2 ++ tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c | 4 +++- tests/usr.bin/xlint/lint1/d_gcc_func.c | 4 +++- tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c | 5 ++++- tests/usr.bin/xlint/lint1/d_init_pop_member.c | 4 +++- tests/usr.bin/xlint/lint1/d_long_double_int.c | 4 +++- tests/usr.bin/xlint/lint1/d_pr_22119.c | 4 +++- tests/usr.bin/xlint/lint1/d_return_type.c | 4 +++- tests/usr.bin/xlint/lint1/expr_cast.c | 4 ++-- tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c | 4 +++- tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c | 4 +++- tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c | 4 ++-- tests/usr.bin/xlint/lint1/gcc_cast_union.c | 4 ++-- tests/usr.bin/xlint/lint1/gcc_stmt_asm.c | 4 +++- tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c | 4 +++- tests/usr.bin/xlint/lint1/init_braces.c | 4 +++- tests/usr.bin/xlint/lint1/msg_003.c | 4 +++- tests/usr.bin/xlint/lint1/msg_011.c | 4 +++- tests/usr.bin/xlint/lint1/msg_012.c | 4 +++- tests/usr.bin/xlint/lint1/msg_021.c | 4 +++- tests/usr.bin/xlint/lint1/msg_023.c | 4 +++- tests/usr.bin/xlint/lint1/msg_028.c | 4 +++- tests/usr.bin/xlint/lint1/msg_030.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_032.c | 4 +++- tests/usr.bin/xlint/lint1/msg_043.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_050.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_052.c | 4 +++- tests/usr.bin/xlint/lint1/msg_053.c | 4 +++- tests/usr.bin/xlint/lint1/msg_057.c | 4 +++- tests/usr.bin/xlint/lint1/msg_059.c | 4 +++- tests/usr.bin/xlint/lint1/msg_062.c | 4 +++- tests/usr.bin/xlint/lint1/msg_063.c | 4 +++- tests/usr.bin/xlint/lint1/msg_072.c | 4 +++- tests/usr.bin/xlint/lint1/msg_084.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_092.c | 4 +++- tests/usr.bin/xlint/lint1/msg_093.c | 4 +++- tests/usr.bin/xlint/lint1/msg_094.c | 4 +++- tests/usr.bin/xlint/lint1/msg_096.c | 4 +++- tests/usr.bin/xlint/lint1/msg_099.c | 4 +++- tests/usr.bin/xlint/lint1/msg_103.c | 4 +++- tests/usr.bin/xlint/lint1/msg_104.c | 4 +++- tests/usr.bin/xlint/lint1/msg_106.c | 4 +++- tests/usr.bin/xlint/lint1/msg_107.c | 4 +++- tests/usr.bin/xlint/lint1/msg_108.c | 4 +++- tests/usr.bin/xlint/lint1/msg_109.c | 4 +++- tests/usr.bin/xlint/lint1/msg_110.c | 4 +++- tests/usr.bin/xlint/lint1/msg_113.c | 4 +++- tests/usr.bin/xlint/lint1/msg_114.c | 4 +++- tests/usr.bin/xlint/lint1/msg_116.c | 4 +++- tests/usr.bin/xlint/lint1/msg_117.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_118.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_119.c | 4 +++- tests/usr.bin/xlint/lint1/msg_120.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_121.c | 4 +++- tests/usr.bin/xlint/lint1/msg_122.c | 4 +++- tests/usr.bin/xlint/lint1/msg_125.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_126.c | 4 +++- tests/usr.bin/xlint/lint1/msg_128.c | 4 +++- tests/usr.bin/xlint/lint1/msg_132_lp64.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_133.c | 4 +++- tests/usr.bin/xlint/lint1/msg_136.c | 4 +++- tests/usr.bin/xlint/lint1/msg_138.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_143.c | 4 +++- tests/usr.bin/xlint/lint1/msg_144.c | 4 +++- tests/usr.bin/xlint/lint1/msg_145.c | 4 +++- tests/usr.bin/xlint/lint1/msg_146.c | 4 +++- tests/usr.bin/xlint/lint1/msg_149.c | 4 +++- tests/usr.bin/xlint/lint1/msg_159.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_163.c | 4 +++- tests/usr.bin/xlint/lint1/msg_164.c | 4 +++- tests/usr.bin/xlint/lint1/msg_165.c | 4 +++- tests/usr.bin/xlint/lint1/msg_166.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_167.c | 4 +++- tests/usr.bin/xlint/lint1/msg_170.c | 4 +++- tests/usr.bin/xlint/lint1/msg_171.c | 4 +++- tests/usr.bin/xlint/lint1/msg_174.c | 4 +++- tests/usr.bin/xlint/lint1/msg_182.c | 4 +++- tests/usr.bin/xlint/lint1/msg_183.c | 4 +++- tests/usr.bin/xlint/lint1/msg_184.c | 4 +++- tests/usr.bin/xlint/lint1/msg_191.c | 4 +++- tests/usr.bin/xlint/lint1/msg_192.c | 6 ++++-- tests/usr.bin/xlint/lint1/msg_194.c | 4 +++- tests/usr.bin/xlint/lint1/msg_195.c | 4 +++- tests/usr.bin/xlint/lint1/msg_200.c | 4 +++- tests/usr.bin/xlint/lint1/msg_201.c | 4 +++- tests/usr.bin/xlint/lint1/msg_202.c | 4 +++- tests/usr.bin/xlint/lint1/msg_205.c | 4 +++- tests/usr.bin/xlint/lint1/msg_206.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_209.c | 4 +++- tests/usr.bin/xlint/lint1/msg_211.c | 4 +++- tests/usr.bin/xlint/lint1/msg_213.c | 4 +++- tests/usr.bin/xlint/lint1/msg_214.c | 4 +++- tests/usr.bin/xlint/lint1/msg_215.c | 4 +++- tests/usr.bin/xlint/lint1/msg_216.c | 4 +++- tests/usr.bin/xlint/lint1/msg_217.c | 4 +++- tests/usr.bin/xlint/lint1/msg_223.c | 4 +++- tests/usr.bin/xlint/lint1/msg_224.c | 4 +++- tests/usr.bin/xlint/lint1/msg_225.c | 4 +++- tests/usr.bin/xlint/lint1/msg_228.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_229.c | 4 +++- tests/usr.bin/xlint/lint1/msg_230.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_231.c | 4 +++- tests/usr.bin/xlint/lint1/msg_232.c | 4 +++- tests/usr.bin/xlint/lint1/msg_236.c | 9 ++++++++- tests/usr.bin/xlint/lint1/msg_237.c | 4 +++- tests/usr.bin/xlint/lint1/msg_239.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_240.c | 4 +++- tests/usr.bin/xlint/lint1/msg_244.c | 4 +++- tests/usr.bin/xlint/lint1/msg_246.c | 4 +++- tests/usr.bin/xlint/lint1/msg_261.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_267.c | 4 +++- tests/usr.bin/xlint/lint1/msg_268.c | 4 +++- tests/usr.bin/xlint/lint1/msg_274.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_275.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_280.c | 4 +++- tests/usr.bin/xlint/lint1/msg_281.c | 4 +++- tests/usr.bin/xlint/lint1/msg_283.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_288.c | 4 +++- tests/usr.bin/xlint/lint1/msg_289.c | 4 +++- tests/usr.bin/xlint/lint1/msg_290.c | 4 +++- tests/usr.bin/xlint/lint1/msg_293.c | 4 +++- tests/usr.bin/xlint/lint1/msg_299.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_300.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_302.c | 4 +++- tests/usr.bin/xlint/lint1/msg_306.c | 4 +++- tests/usr.bin/xlint/lint1/msg_307.c | 4 +++- tests/usr.bin/xlint/lint1/msg_309.c | 4 +++- tests/usr.bin/xlint/lint1/msg_310.c | 4 +++- tests/usr.bin/xlint/lint1/msg_311.c | 4 +++- tests/usr.bin/xlint/lint1/msg_314.c | 4 +++- tests/usr.bin/xlint/lint1/msg_317.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_318.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_320.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_324.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_328.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_329.c | 4 +++- tests/usr.bin/xlint/lint1/msg_333.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_335.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_340.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_345.c | 4 ++-- tests/usr.bin/xlint/lint1/msg_350.c | 4 +++- tests/usr.bin/xlint/lint1/msg_351.c | 6 +++--- tests/usr.bin/xlint/lint1/msg_352.c | 4 +++- tests/usr.bin/xlint/lint1/msg_353.c | 4 ++-- tests/usr.bin/xlint/lint1/stmt_for.c | 4 +++- tests/usr.bin/xlint/lint1/stmt_goto.c | 4 +++- tests/usr.bin/xlint/xlint/t_xlint.sh | 15 ++++++++++++--- 157 files changed, 448 insertions(+), 200 deletions(-) (limited to 'tests') diff --git a/tests/usr.bin/xlint/lint1/c11_atomic.c b/tests/usr.bin/xlint/lint1/c11_atomic.c index cd65a1d53d7..d5fbf3d549b 100644 --- a/tests/usr.bin/xlint/lint1/c11_atomic.c +++ b/tests/usr.bin/xlint/lint1/c11_atomic.c @@ -1,4 +1,4 @@ -/* $NetBSD: c11_atomic.c,v 1.4 2023/07/07 00:20:39 rillig Exp $ */ +/* $NetBSD: c11_atomic.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "c11_atomic.c" /* @@ -11,7 +11,7 @@ * msg_350.c */ -/* lint1-extra-flags: -Ac11 */ +/* lint1-extra-flags: -Ac11 -X 351 */ /* C11 6.7.3 "Type qualifiers" */ typedef _Atomic int atomic_int; diff --git a/tests/usr.bin/xlint/lint1/c11_generic_expression.c b/tests/usr.bin/xlint/lint1/c11_generic_expression.c index e629a5235a0..da2a5ebc548 100644 --- a/tests/usr.bin/xlint/lint1/c11_generic_expression.c +++ b/tests/usr.bin/xlint/lint1/c11_generic_expression.c @@ -1,6 +1,8 @@ -/* $NetBSD: c11_generic_expression.c,v 1.16 2023/07/07 00:20:39 rillig Exp $ */ +/* $NetBSD: c11_generic_expression.c,v 1.17 2023/07/07 19:45:22 rillig Exp $ */ # 3 "c11_generic_expression.c" +/* lint1-extra-flags: -X 351 */ + /* * C99 added support for type-generic macros, but these were limited to the * header . C11 made this feature generally available. @@ -101,7 +103,6 @@ primary_expression(void) * which is then silently ignored by init_expr. This situation is already * covered by the compilers, so there is no need for lint to double-check it. */ -/* expect+1: warning: missing 'extern' header declaration for 'x' [351] */ const char *x = _Generic( 1ULL + 1.0f, int: 1 diff --git a/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c b/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c index 9fab24a0192..372b38b8417 100644 --- a/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c +++ b/tests/usr.bin/xlint/lint1/c99_bool_strict_suppressed.c @@ -1,4 +1,4 @@ -/* $NetBSD: c99_bool_strict_suppressed.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */ +/* $NetBSD: c99_bool_strict_suppressed.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "c99_bool_strict_suppressed.c" /* @@ -18,7 +18,7 @@ * tree.c 1.305 from 2021-07-04. */ -/* lint1-extra-flags: -T -X 107,330,331,332,333 */ +/* lint1-extra-flags: -T -X 107,330,331,332,333 -X 351 */ /* ARGSUSED */ void diff --git a/tests/usr.bin/xlint/lint1/d_alignof.c b/tests/usr.bin/xlint/lint1/d_alignof.c index 44afc975ba4..48dc27a15eb 100644 --- a/tests/usr.bin/xlint/lint1/d_alignof.c +++ b/tests/usr.bin/xlint/lint1/d_alignof.c @@ -1,8 +1,10 @@ -/* $NetBSD: d_alignof.c,v 1.11 2023/06/30 16:39:17 rillig Exp $ */ +/* $NetBSD: d_alignof.c,v 1.12 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_alignof.c" /* https://gcc.gnu.org/onlinedocs/gcc/Alignment.html */ +/* lint1-extra-flags: -X 351 */ + unsigned long leading_and_trailing_alignof_type(void) { diff --git a/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c b/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c index af63e225223..9b8332a6a63 100644 --- a/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c +++ b/tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_compound_literal_comma.c,v 1.3 2021/03/20 11:24:49 rillig Exp $ */ +/* $NetBSD: d_c99_compound_literal_comma.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_c99_compound_literal_comma.c" /*- @@ -8,6 +8,8 @@ * C99 6.5.2.5 "Compound literals" for the semantics. */ +/* lint1-extra-flags: -X 351 */ + struct point { int x; int y; diff --git a/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c b/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c index 4caedec8dd5..f698debb3eb 100644 --- a/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c +++ b/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_decls_after_stmt.c,v 1.5 2023/01/22 17:17:25 rillig Exp $ */ +/* $NetBSD: d_c99_decls_after_stmt.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_c99_decls_after_stmt.c" /* @@ -8,6 +8,8 @@ * https://gnats.netbsd.org/45417 */ +/* lint1-extra-flags: -X 351 */ + void two_groups_of_decl_plus_stmt(void) { diff --git a/tests/usr.bin/xlint/lint1/d_c99_union_cast.c b/tests/usr.bin/xlint/lint1/d_c99_union_cast.c index ceedcc14701..006185b7a4e 100644 --- a/tests/usr.bin/xlint/lint1/d_c99_union_cast.c +++ b/tests/usr.bin/xlint/lint1/d_c99_union_cast.c @@ -1,9 +1,9 @@ -/* $NetBSD: d_c99_union_cast.c,v 1.7 2021/08/03 20:57:06 rillig Exp $ */ +/* $NetBSD: d_c99_union_cast.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_c99_union_cast.c" /* C99 does not define union cast, it is a GCC extension. */ -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ struct bar { int a; diff --git a/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c b/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c index 36365dc1cad..f89536b0b07 100644 --- a/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c +++ b/tests/usr.bin/xlint/lint1/d_cast_fun_array_param.c @@ -1,6 +1,8 @@ -/* $NetBSD: d_cast_fun_array_param.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ +/* $NetBSD: d_cast_fun_array_param.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_cast_fun_array_param.c" +/* lint1-extra-flags: -X 351 */ + static void f(void *b[4]) { diff --git a/tests/usr.bin/xlint/lint1/d_compound_literals1.c b/tests/usr.bin/xlint/lint1/d_compound_literals1.c index ed1e5107d07..9c9496b412c 100644 --- a/tests/usr.bin/xlint/lint1/d_compound_literals1.c +++ b/tests/usr.bin/xlint/lint1/d_compound_literals1.c @@ -1,8 +1,10 @@ -/* $NetBSD: d_compound_literals1.c,v 1.4 2022/04/24 20:08:23 rillig Exp $ */ +/* $NetBSD: d_compound_literals1.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_compound_literals1.c" /* compound literals */ +/* lint1-extra-flags: -X 351 */ + struct p { short a, b, c, d; }; diff --git a/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c b/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c index 6a634f91e1e..21cb23ce1c0 100644 --- a/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c +++ b/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c @@ -1,8 +1,10 @@ -/* $NetBSD: d_ellipsis_in_switch.c,v 1.4 2021/03/27 13:59:18 rillig Exp $ */ +/* $NetBSD: d_ellipsis_in_switch.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_ellipsis_in_switch.c" /* Using a range in a case label is a GCC extension. */ +/* lint1-extra-flags: -X 351 */ + int x(void) { diff --git a/tests/usr.bin/xlint/lint1/d_fold_test.c b/tests/usr.bin/xlint/lint1/d_fold_test.c index 2b836085351..581cecd7db6 100644 --- a/tests/usr.bin/xlint/lint1/d_fold_test.c +++ b/tests/usr.bin/xlint/lint1/d_fold_test.c @@ -5,6 +5,8 @@ * truthiness, such as in the condition of an if statement. */ +/* lint1-extra-flags: -X 351 */ + struct s { int member; }; diff --git a/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c b/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c index e968d2c4357..08ecc055b72 100644 --- a/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c +++ b/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c @@ -1,4 +1,4 @@ -/* $NetBSD: d_gcc_compound_statements2.c,v 1.5 2022/02/26 20:36:11 rillig Exp $ */ +/* $NetBSD: d_gcc_compound_statements2.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_gcc_compound_statements2.c" /* @@ -7,6 +7,8 @@ * https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html */ +/* lint1-extra-flags: -X 351 */ + struct cpu_info { int bar; }; diff --git a/tests/usr.bin/xlint/lint1/d_gcc_func.c b/tests/usr.bin/xlint/lint1/d_gcc_func.c index 47b575aa2a6..6d7ef0fdaeb 100644 --- a/tests/usr.bin/xlint/lint1/d_gcc_func.c +++ b/tests/usr.bin/xlint/lint1/d_gcc_func.c @@ -1,8 +1,10 @@ -/* $NetBSD: d_gcc_func.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ +/* $NetBSD: d_gcc_func.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_gcc_func.c" /* gcc __FUNCTION__ */ +/* lint1-extra-flags: -X 351 */ + void foo(const char *p) { diff --git a/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c b/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c index 1bf3e9f8c65..fcc2e54e926 100644 --- a/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c +++ b/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c @@ -1,7 +1,10 @@ -/* $NetBSD: d_gcc_variable_array_init.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ +/* $NetBSD: d_gcc_variable_array_init.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_gcc_variable_array_init.c" /* gcc: variable array initializer */ + +/* lint1-extra-flags: -X 351 */ + void foo(int i) { diff --git a/tests/usr.bin/xlint/lint1/d_init_pop_member.c b/tests/usr.bin/xlint/lint1/d_init_pop_member.c index 3799c6477d0..a60f020faa6 100644 --- a/tests/usr.bin/xlint/lint1/d_init_pop_member.c +++ b/tests/usr.bin/xlint/lint1/d_init_pop_member.c @@ -1,4 +1,4 @@ -/* $NetBSD: d_init_pop_member.c,v 1.9 2022/01/15 14:22:03 rillig Exp $ */ +/* $NetBSD: d_init_pop_member.c,v 1.10 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_init_pop_member.c" /* @@ -8,6 +8,8 @@ * named initializer. */ +/* lint1-extra-flags: -X 351 */ + struct rgb { unsigned red; unsigned green; diff --git a/tests/usr.bin/xlint/lint1/d_long_double_int.c b/tests/usr.bin/xlint/lint1/d_long_double_int.c index 7217d93563f..6905252ffe6 100644 --- a/tests/usr.bin/xlint/lint1/d_long_double_int.c +++ b/tests/usr.bin/xlint/lint1/d_long_double_int.c @@ -1,8 +1,10 @@ -/* $NetBSD: d_long_double_int.c,v 1.5 2022/01/15 14:22:03 rillig Exp $ */ +/* $NetBSD: d_long_double_int.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_long_double_int.c" /* PR bin/39639: writing "long double" gave "long int" */ +/* lint1-extra-flags: -X 351 */ + int fail(long double *a, long int *b) { diff --git a/tests/usr.bin/xlint/lint1/d_pr_22119.c b/tests/usr.bin/xlint/lint1/d_pr_22119.c index fb618774685..3052205335c 100644 --- a/tests/usr.bin/xlint/lint1/d_pr_22119.c +++ b/tests/usr.bin/xlint/lint1/d_pr_22119.c @@ -1,4 +1,4 @@ -/* $NetBSD: d_pr_22119.c,v 1.4 2022/04/01 22:28:21 rillig Exp $ */ +/* $NetBSD: d_pr_22119.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_pr_22119.c" /* @@ -8,6 +8,8 @@ * cast is NULL. */ +/* lint1-extra-flags: -X 351 */ + void func1(void) { diff --git a/tests/usr.bin/xlint/lint1/d_return_type.c b/tests/usr.bin/xlint/lint1/d_return_type.c index c17644c8f50..4d998d58c76 100644 --- a/tests/usr.bin/xlint/lint1/d_return_type.c +++ b/tests/usr.bin/xlint/lint1/d_return_type.c @@ -1,6 +1,8 @@ -/* $NetBSD: d_return_type.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: d_return_type.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "d_return_type.c" +/* lint1-extra-flags: -X 351 */ + enum A { A }; diff --git a/tests/usr.bin/xlint/lint1/expr_cast.c b/tests/usr.bin/xlint/lint1/expr_cast.c index b2e16d36e88..b76231d3a1a 100644 --- a/tests/usr.bin/xlint/lint1/expr_cast.c +++ b/tests/usr.bin/xlint/lint1/expr_cast.c @@ -1,4 +1,4 @@ -/* $NetBSD: expr_cast.c,v 1.3 2021/08/03 18:44:33 rillig Exp $ */ +/* $NetBSD: expr_cast.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "expr_cast.c" /* @@ -12,7 +12,7 @@ * c-typeck.c, function build_c_cast, RECORD_OR_UNION_TYPE_P. */ -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ struct S { int member; diff --git a/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c b/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c index 9e858039c7e..e38842020da 100644 --- a/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c +++ b/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c @@ -1,10 +1,12 @@ -/* $NetBSD: gcc_attribute_aligned.c,v 1.5 2022/08/27 23:24:37 rillig Exp $ */ +/* $NetBSD: gcc_attribute_aligned.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_attribute_aligned.c" /* * Test size computations on aligned and packed structs. */ +/* lint1-extra-flags: -X 351 */ + typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; diff --git a/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c b/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c index fa021e19e0c..1fab99bf2f9 100644 --- a/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c +++ b/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_builtin_alloca.c,v 1.3 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: gcc_builtin_alloca.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_builtin_alloca.c" /* @@ -8,6 +8,8 @@ * https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c b/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c index 01f617d0711..b097f2ed6c9 100644 --- a/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c +++ b/tests/usr.bin/xlint/lint1/gcc_builtin_overflow.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_builtin_overflow.c,v 1.2 2021/09/03 22:48:49 rillig Exp $ */ +/* $NetBSD: gcc_builtin_overflow.c,v 1.3 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_builtin_overflow.c" /* @@ -8,7 +8,7 @@ * https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html */ -/* lint1-extra-flags: -T */ +/* lint1-extra-flags: -T -X 351 */ void is_overflow(void) diff --git a/tests/usr.bin/xlint/lint1/gcc_cast_union.c b/tests/usr.bin/xlint/lint1/gcc_cast_union.c index 0db3f52e326..8a462d9ace3 100644 --- a/tests/usr.bin/xlint/lint1/gcc_cast_union.c +++ b/tests/usr.bin/xlint/lint1/gcc_cast_union.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_cast_union.c,v 1.3 2021/08/03 21:18:24 rillig Exp $ */ +/* $NetBSD: gcc_cast_union.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_cast_union.c" /* @@ -11,7 +11,7 @@ * https://gcc.gnu.org/onlinedocs/gcc/Cast-to-Union.html */ -/* lint1-extra-flags: -e */ +/* lint1-extra-flags: -e -X 351 */ union anything { _Bool m_bool; diff --git a/tests/usr.bin/xlint/lint1/gcc_stmt_asm.c b/tests/usr.bin/xlint/lint1/gcc_stmt_asm.c index 4fe955a0ca9..9450e5cd6ca 100644 --- a/tests/usr.bin/xlint/lint1/gcc_stmt_asm.c +++ b/tests/usr.bin/xlint/lint1/gcc_stmt_asm.c @@ -1,10 +1,12 @@ -/* $NetBSD: gcc_stmt_asm.c,v 1.4 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: gcc_stmt_asm.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_stmt_asm.c" /* * Tests for the GCC 'asm' statement. */ +/* lint1-extra-flags: -X 351 */ + void function(void) { diff --git a/tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c b/tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c index fa9d198424d..91698f195eb 100644 --- a/tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c +++ b/tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c @@ -1,4 +1,4 @@ -/* $NetBSD: gcc_typeof_after_statement.c,v 1.5 2023/02/05 10:57:48 rillig Exp $ */ +/* $NetBSD: gcc_typeof_after_statement.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "gcc_typeof_after_statement.c" /* @@ -6,6 +6,8 @@ * there was a statement before it. */ +/* lint1-extra-flags: -X 351 */ + void * example(void **ptr) { diff --git a/tests/usr.bin/xlint/lint1/init_braces.c b/tests/usr.bin/xlint/lint1/init_braces.c index 9f5821ddda7..fa0eecfc439 100644 --- a/tests/usr.bin/xlint/lint1/init_braces.c +++ b/tests/usr.bin/xlint/lint1/init_braces.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_braces.c,v 1.7 2023/07/01 06:09:24 rillig Exp $ */ +/* $NetBSD: init_braces.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ # 3 "init_braces.c" /* @@ -9,6 +9,8 @@ * C11 6.7.9 */ +/* lint1-extra-flags: -X 351 */ + void init_int(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_003.c b/tests/usr.bin/xlint/lint1/msg_003.c index c91ccd823f8..ce3e5424627 100644 --- a/tests/usr.bin/xlint/lint1/msg_003.c +++ b/tests/usr.bin/xlint/lint1/msg_003.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_003.c,v 1.5 2022/06/15 20:18:31 rillig Exp $ */ +/* $NetBSD: msg_003.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_003.c" // Test for message: '%s' declared in argument declaration list [3] +/* lint1-extra-flags: -X 351 */ + /*ARGSUSED*/ void example(declare_struct, declare_union, declare_enum) diff --git a/tests/usr.bin/xlint/lint1/msg_011.c b/tests/usr.bin/xlint/lint1/msg_011.c index fe9176fa091..de4b33ea7e0 100644 --- a/tests/usr.bin/xlint/lint1/msg_011.c +++ b/tests/usr.bin/xlint/lint1/msg_011.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_011.c,v 1.6 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_011.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_011.c" // Test for message: bit-field initializer out of range [11] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_012.c b/tests/usr.bin/xlint/lint1/msg_012.c index 1e26ccfbabc..0e8c5f60b33 100644 --- a/tests/usr.bin/xlint/lint1/msg_012.c +++ b/tests/usr.bin/xlint/lint1/msg_012.c @@ -1,9 +1,11 @@ -/* $NetBSD: msg_012.c,v 1.4 2022/04/01 23:16:32 rillig Exp $ */ +/* $NetBSD: msg_012.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_012.c" // Test for message: compiler takes size of function [12] /* This message is not used. */ +/* lint1-extra-flags: -X 351 */ + unsigned long example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_021.c b/tests/usr.bin/xlint/lint1/msg_021.c index 799e95eafe7..d9f323ef300 100644 --- a/tests/usr.bin/xlint/lint1/msg_021.c +++ b/tests/usr.bin/xlint/lint1/msg_021.c @@ -1,10 +1,12 @@ -/* $NetBSD: msg_021.c,v 1.4 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_021.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_021.c" // Test for message: redeclaration of formal parameter '%s' [21] /* See also message 237, which has the same text. */ +/* lint1-extra-flags: -X 351 */ + /*ARGSUSED*/ void /* expect+1: error: redeclaration of formal parameter 'parameter' [21] */ diff --git a/tests/usr.bin/xlint/lint1/msg_023.c b/tests/usr.bin/xlint/lint1/msg_023.c index 27885b2ba14..11cec2c2ad3 100644 --- a/tests/usr.bin/xlint/lint1/msg_023.c +++ b/tests/usr.bin/xlint/lint1/msg_023.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_023.c,v 1.4 2021/07/11 19:30:56 rillig Exp $ */ +/* $NetBSD: msg_023.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_023.c" // Test for message: undefined label '%s' [23] +/* lint1-extra-flags: -X 351 */ + void test(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_028.c b/tests/usr.bin/xlint/lint1/msg_028.c index 5a047f646aa..d6bd8a67a55 100644 --- a/tests/usr.bin/xlint/lint1/msg_028.c +++ b/tests/usr.bin/xlint/lint1/msg_028.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_028.c,v 1.4 2022/06/19 11:50:42 rillig Exp $ */ +/* $NetBSD: msg_028.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_028.c" // Test for message: redefinition of '%s' [28] +/* lint1-extra-flags: -X 351 */ + int defined(int arg) { diff --git a/tests/usr.bin/xlint/lint1/msg_030.c b/tests/usr.bin/xlint/lint1/msg_030.c index a136c0c6d4b..69b05289da7 100644 --- a/tests/usr.bin/xlint/lint1/msg_030.c +++ b/tests/usr.bin/xlint/lint1/msg_030.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_030.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_030.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_030.c" /* Test for message: redeclaration of '%s'; ANSI C requires static [30] */ -/* lint1-flags: -sw */ +/* lint1-flags: -sw -X 351 */ /* expect+1: error: old-style declaration; add 'int' [1] */ static a; diff --git a/tests/usr.bin/xlint/lint1/msg_032.c b/tests/usr.bin/xlint/lint1/msg_032.c index 641689b2686..2a2b3bfdd03 100644 --- a/tests/usr.bin/xlint/lint1/msg_032.c +++ b/tests/usr.bin/xlint/lint1/msg_032.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_032.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_032.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_032.c" // Test for message: type of argument '%s' defaults to 'int' [32] +/* lint1-extra-flags: -X 351 */ + /* expect+5: error: old-style declaration; add 'int' [1] */ add(a, b, c) /* expect+3: warning: type of argument 'a' defaults to 'int' [32] */ diff --git a/tests/usr.bin/xlint/lint1/msg_043.c b/tests/usr.bin/xlint/lint1/msg_043.c index ea97c8f35a2..a36aad5dcc3 100644 --- a/tests/usr.bin/xlint/lint1/msg_043.c +++ b/tests/usr.bin/xlint/lint1/msg_043.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_043.c,v 1.4 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_043.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_043.c" /* Test for message: redefinition of '%s' hides earlier one [43] */ -/* lint1-extra-flags: -h */ +/* lint1-extra-flags: -h -X 351 */ struct s { int member; diff --git a/tests/usr.bin/xlint/lint1/msg_050.c b/tests/usr.bin/xlint/lint1/msg_050.c index fc496d72931..b720d7910c2 100644 --- a/tests/usr.bin/xlint/lint1/msg_050.c +++ b/tests/usr.bin/xlint/lint1/msg_050.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_050.c,v 1.5 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_050.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_050.c" /* Test for message: argument '%s' has function type, should be pointer [50] */ -/* lint1-flags: -Stw */ +/* lint1-flags: -tw */ typedef void (function)(); diff --git a/tests/usr.bin/xlint/lint1/msg_052.c b/tests/usr.bin/xlint/lint1/msg_052.c index 7aa52cf62b5..e064ec630d6 100644 --- a/tests/usr.bin/xlint/lint1/msg_052.c +++ b/tests/usr.bin/xlint/lint1/msg_052.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_052.c,v 1.4 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_052.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_052.c" // Test for message: cannot initialize parameter '%s' [52] +/* lint1-extra-flags: -X 351 */ + int definition(i) /* expect+1: error: cannot initialize parameter 'i' [52] */ diff --git a/tests/usr.bin/xlint/lint1/msg_053.c b/tests/usr.bin/xlint/lint1/msg_053.c index 2c37966ce37..5ae433e4a40 100644 --- a/tests/usr.bin/xlint/lint1/msg_053.c +++ b/tests/usr.bin/xlint/lint1/msg_053.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_053.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_053.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_053.c" // Test for message: declared argument '%s' is missing [53] +/* lint1-extra-flags: -X 351 */ + /* expect+2: error: old-style declaration; add 'int' [1] */ oldstyle(argument) int argument; diff --git a/tests/usr.bin/xlint/lint1/msg_057.c b/tests/usr.bin/xlint/lint1/msg_057.c index 7a79868e310..c2f9a1a42f5 100644 --- a/tests/usr.bin/xlint/lint1/msg_057.c +++ b/tests/usr.bin/xlint/lint1/msg_057.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_057.c,v 1.6 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_057.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_057.c" // Test for message: enumeration constant '%s' hides parameter [57] +/* lint1-extra-flags: -X 351 */ + long /* expect+3: warning: argument 'red' unused in function 'rgb' [231] */ /* expect+2: warning: argument 'green' unused in function 'rgb' [231] */ diff --git a/tests/usr.bin/xlint/lint1/msg_059.c b/tests/usr.bin/xlint/lint1/msg_059.c index 85e8511b0d3..f933baa8cc6 100644 --- a/tests/usr.bin/xlint/lint1/msg_059.c +++ b/tests/usr.bin/xlint/lint1/msg_059.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_059.c,v 1.4 2022/06/20 21:13:36 rillig Exp $ */ +/* $NetBSD: msg_059.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_059.c" // Test for message: formal parameter #%d lacks name [59] +/* lint1-extra-flags: -X 351 */ + /* expect+4: error: formal parameter #2 lacks name [59] */ /* expect+3: error: formal parameter #3 lacks name [59] */ int diff --git a/tests/usr.bin/xlint/lint1/msg_062.c b/tests/usr.bin/xlint/lint1/msg_062.c index e7e19a73b55..d6a9baf4819 100644 --- a/tests/usr.bin/xlint/lint1/msg_062.c +++ b/tests/usr.bin/xlint/lint1/msg_062.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_062.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_062.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_062.c" // Test for message: function prototype parameters must have types [62] +/* lint1-extra-flags: -X 351 */ + /* expect+1: error: old-style declaration; add 'int' [1] */ outer() { /* expect+2: warning: function prototype parameters must have types [62] */ diff --git a/tests/usr.bin/xlint/lint1/msg_063.c b/tests/usr.bin/xlint/lint1/msg_063.c index adf5ba6aca2..6473a14900b 100644 --- a/tests/usr.bin/xlint/lint1/msg_063.c +++ b/tests/usr.bin/xlint/lint1/msg_063.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_063.c,v 1.3 2022/02/27 20:02:44 rillig Exp $ */ +/* $NetBSD: msg_063.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_063.c" // Test for message: prototype does not match old-style definition [63] +/* lint1-extra-flags: -X 351 */ + int function(a, b) int a, b; diff --git a/tests/usr.bin/xlint/lint1/msg_072.c b/tests/usr.bin/xlint/lint1/msg_072.c index 8f1ba4250d8..c02a30c5691 100644 --- a/tests/usr.bin/xlint/lint1/msg_072.c +++ b/tests/usr.bin/xlint/lint1/msg_072.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_072.c,v 1.7 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_072.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_072.c" // Test for message: typedef declares no type name [72] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: typedef declares no type name [72] */ typedef int; diff --git a/tests/usr.bin/xlint/lint1/msg_084.c b/tests/usr.bin/xlint/lint1/msg_084.c index 02d6f2830c5..0a956b03d64 100644 --- a/tests/usr.bin/xlint/lint1/msg_084.c +++ b/tests/usr.bin/xlint/lint1/msg_084.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_084.c,v 1.4 2022/04/16 09:20:01 rillig Exp $ */ +/* $NetBSD: msg_084.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_084.c" /* Test for message: ANSI C requires formal parameter before '...' [84] */ -/* lint1-flags: -sw */ +/* lint1-flags: -sw -X 351 */ /* expect+2: error: ANSI C requires formal parameter before '...' [84] */ void diff --git a/tests/usr.bin/xlint/lint1/msg_092.c b/tests/usr.bin/xlint/lint1/msg_092.c index 581895429f8..a220f42f440 100644 --- a/tests/usr.bin/xlint/lint1/msg_092.c +++ b/tests/usr.bin/xlint/lint1/msg_092.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_092.c,v 1.5 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_092.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_092.c" // Test for message: inconsistent redeclaration of static '%s' [92] +/* lint1-extra-flags: -X 351 */ + static int random(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_093.c b/tests/usr.bin/xlint/lint1/msg_093.c index 5fc60b63bc9..4beaf92c3f7 100644 --- a/tests/usr.bin/xlint/lint1/msg_093.c +++ b/tests/usr.bin/xlint/lint1/msg_093.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_093.c,v 1.5 2022/06/21 21:18:30 rillig Exp $ */ +/* $NetBSD: msg_093.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_093.c" // Test for message: dubious static function '%s' at block level [93] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_094.c b/tests/usr.bin/xlint/lint1/msg_094.c index e7486b837b7..fab909eb855 100644 --- a/tests/usr.bin/xlint/lint1/msg_094.c +++ b/tests/usr.bin/xlint/lint1/msg_094.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_094.c,v 1.5 2022/06/21 21:18:30 rillig Exp $ */ +/* $NetBSD: msg_094.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_094.c" // Test for message: function '%s' has illegal storage class [94] +/* lint1-extra-flags: -X 351 */ + /* expect+2: error: illegal storage class [8] */ register int global_example(int arg) diff --git a/tests/usr.bin/xlint/lint1/msg_096.c b/tests/usr.bin/xlint/lint1/msg_096.c index 8295dd1cc9e..19e5fb204a3 100644 --- a/tests/usr.bin/xlint/lint1/msg_096.c +++ b/tests/usr.bin/xlint/lint1/msg_096.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_096.c,v 1.6 2022/06/21 21:18:30 rillig Exp $ */ +/* $NetBSD: msg_096.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_096.c" // Test for message: cannot dereference non-pointer type '%s' [96] +/* lint1-extra-flags: -X 351 */ + int unary_plus(int i) { diff --git a/tests/usr.bin/xlint/lint1/msg_099.c b/tests/usr.bin/xlint/lint1/msg_099.c index ff14c014c28..c055a60d504 100644 --- a/tests/usr.bin/xlint/lint1/msg_099.c +++ b/tests/usr.bin/xlint/lint1/msg_099.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_099.c,v 1.5 2022/04/03 09:34:45 rillig Exp $ */ +/* $NetBSD: msg_099.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_099.c" // Test for message: '%s' undefined [99] +/* lint1-extra-flags: -X 351 */ + void example(int defined_variable) { diff --git a/tests/usr.bin/xlint/lint1/msg_103.c b/tests/usr.bin/xlint/lint1/msg_103.c index daff36b9e46..0c6b2c9edeb 100644 --- a/tests/usr.bin/xlint/lint1/msg_103.c +++ b/tests/usr.bin/xlint/lint1/msg_103.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_103.c,v 1.4 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_103.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_103.c" // Test for message: left operand of '.' must be struct or union, not '%s' [103] +/* lint1-extra-flags: -X 351 */ + struct point { int x, y; }; diff --git a/tests/usr.bin/xlint/lint1/msg_104.c b/tests/usr.bin/xlint/lint1/msg_104.c index fdf0f8bb6aa..cab5db232e7 100644 --- a/tests/usr.bin/xlint/lint1/msg_104.c +++ b/tests/usr.bin/xlint/lint1/msg_104.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_104.c,v 1.4 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_104.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_104.c" // Test for message: left operand of '->' must be pointer to struct or union, not '%s' [104] +/* lint1-extra-flags: -X 351 */ + struct point { int x, y; }; diff --git a/tests/usr.bin/xlint/lint1/msg_106.c b/tests/usr.bin/xlint/lint1/msg_106.c index 6de12d0a8d1..b0a59600384 100644 --- a/tests/usr.bin/xlint/lint1/msg_106.c +++ b/tests/usr.bin/xlint/lint1/msg_106.c @@ -1,9 +1,11 @@ -/* $NetBSD: msg_106.c,v 1.3 2022/06/15 20:18:31 rillig Exp $ */ +/* $NetBSD: msg_106.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_106.c" // Test for message: left operand of '->' must be pointer [106] // This message is not used. +/* lint1-extra-flags: -X 351 */ + struct s { int member; }; diff --git a/tests/usr.bin/xlint/lint1/msg_107.c b/tests/usr.bin/xlint/lint1/msg_107.c index 216bc1f887f..ec5438dec91 100644 --- a/tests/usr.bin/xlint/lint1/msg_107.c +++ b/tests/usr.bin/xlint/lint1/msg_107.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_107.c,v 1.5 2023/06/03 20:28:54 rillig Exp $ */ +/* $NetBSD: msg_107.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_107.c" // Test for message: operands of '%s' have incompatible types '%s' and '%s' [107] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ void compare(double d, void *ptr) diff --git a/tests/usr.bin/xlint/lint1/msg_108.c b/tests/usr.bin/xlint/lint1/msg_108.c index a7317b32c1d..065d63e47c1 100644 --- a/tests/usr.bin/xlint/lint1/msg_108.c +++ b/tests/usr.bin/xlint/lint1/msg_108.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_108.c,v 1.8 2023/05/22 12:55:04 rillig Exp $ */ +/* $NetBSD: msg_108.c,v 1.9 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_108.c" // Test for message: operand of '%s' has invalid type '%s' [108] +/* lint1-extra-flags: -X 351 */ + /* * Before tree.c 1.137 from 2021-01-19, taking the complement of a struct * (an absurd idea, by the way), resulted in an internal error because the diff --git a/tests/usr.bin/xlint/lint1/msg_109.c b/tests/usr.bin/xlint/lint1/msg_109.c index eae8b440a2b..60ced736f4d 100644 --- a/tests/usr.bin/xlint/lint1/msg_109.c +++ b/tests/usr.bin/xlint/lint1/msg_109.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_109.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_109.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_109.c" // Test for message: void type illegal in expression [109] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ int example(int arg) diff --git a/tests/usr.bin/xlint/lint1/msg_110.c b/tests/usr.bin/xlint/lint1/msg_110.c index 3cc6750ee3d..3d3fc69a5b9 100644 --- a/tests/usr.bin/xlint/lint1/msg_110.c +++ b/tests/usr.bin/xlint/lint1/msg_110.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_110.c,v 1.3 2021/07/25 10:26:46 rillig Exp $ */ +/* $NetBSD: msg_110.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_110.c" // Test for message: pointer to function is not allowed here [110] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ void call_take(int (*ptr)(int)) diff --git a/tests/usr.bin/xlint/lint1/msg_113.c b/tests/usr.bin/xlint/lint1/msg_113.c index 0e7ac50cd5c..f882680a504 100644 --- a/tests/usr.bin/xlint/lint1/msg_113.c +++ b/tests/usr.bin/xlint/lint1/msg_113.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_113.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_113.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_113.c" // Test for message: cannot take address of register '%s' [113] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ void example(register int arg) diff --git a/tests/usr.bin/xlint/lint1/msg_114.c b/tests/usr.bin/xlint/lint1/msg_114.c index 7d71b6f7b83..e1749f3f3e6 100644 --- a/tests/usr.bin/xlint/lint1/msg_114.c +++ b/tests/usr.bin/xlint/lint1/msg_114.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_114.c,v 1.6 2022/06/21 21:18:30 rillig Exp $ */ +/* $NetBSD: msg_114.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_114.c" // Test for message: %soperand of '%s' must be lvalue [114] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ void example(int a) diff --git a/tests/usr.bin/xlint/lint1/msg_116.c b/tests/usr.bin/xlint/lint1/msg_116.c index 0271601adad..d591c6429d3 100644 --- a/tests/usr.bin/xlint/lint1/msg_116.c +++ b/tests/usr.bin/xlint/lint1/msg_116.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_116.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_116.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_116.c" // Test for message: illegal pointer subtraction [116] +/* lint1-extra-flags: -X 351 */ + /* * Subtracting an int pointer from a double pointer does not make sense. * The result cannot be reasonably defined since it is "the difference of diff --git a/tests/usr.bin/xlint/lint1/msg_117.c b/tests/usr.bin/xlint/lint1/msg_117.c index 0e512e30911..c6353adce23 100644 --- a/tests/usr.bin/xlint/lint1/msg_117.c +++ b/tests/usr.bin/xlint/lint1/msg_117.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_117.c,v 1.13 2023/01/29 17:13:10 rillig Exp $ */ +/* $NetBSD: msg_117.c,v 1.14 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_117.c" // Test for message: bitwise '%s' on signed value possibly nonportable [117] -/* lint1-extra-flags: -p */ +/* lint1-extra-flags: -p -X 351 */ int shr(int a, int b) diff --git a/tests/usr.bin/xlint/lint1/msg_118.c b/tests/usr.bin/xlint/lint1/msg_118.c index 9303ba47621..b31d9b6edfd 100644 --- a/tests/usr.bin/xlint/lint1/msg_118.c +++ b/tests/usr.bin/xlint/lint1/msg_118.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_118.c,v 1.6 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_118.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_118.c" /* Test for message: semantics of '%s' change in ANSI C; use explicit cast [118] */ -/* lint1-flags: -hw */ +/* lint1-flags: -hw -X 351 */ int int_shl_uint(int left, unsigned int right) diff --git a/tests/usr.bin/xlint/lint1/msg_119.c b/tests/usr.bin/xlint/lint1/msg_119.c index 2981ea7e3bc..be085532874 100644 --- a/tests/usr.bin/xlint/lint1/msg_119.c +++ b/tests/usr.bin/xlint/lint1/msg_119.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_119.c,v 1.3 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_119.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_119.c" // Test for message: conversion of '%s' to '%s' is out of range [119] +/* lint1-extra-flags: -X 351 */ + float too_big(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_120.c b/tests/usr.bin/xlint/lint1/msg_120.c index e1b4bf356bb..6ab435b147d 100644 --- a/tests/usr.bin/xlint/lint1/msg_120.c +++ b/tests/usr.bin/xlint/lint1/msg_120.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_120.c,v 1.6 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_120.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_120.c" // Test for message: bitwise '%s' on signed value nonportable [120] -/* lint1-extra-flags: -p */ +/* lint1-extra-flags: -p -X 351 */ int shr(int a, int b) diff --git a/tests/usr.bin/xlint/lint1/msg_121.c b/tests/usr.bin/xlint/lint1/msg_121.c index 228fb6a1596..3aa89d1462a 100644 --- a/tests/usr.bin/xlint/lint1/msg_121.c +++ b/tests/usr.bin/xlint/lint1/msg_121.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_121.c,v 1.6 2022/06/19 12:14:34 rillig Exp $ */ +/* $NetBSD: msg_121.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_121.c" // Test for message: negative shift [121] +/* lint1-extra-flags: -X 351 */ + int example(int x) { diff --git a/tests/usr.bin/xlint/lint1/msg_122.c b/tests/usr.bin/xlint/lint1/msg_122.c index ff441ff534c..b602d673e29 100644 --- a/tests/usr.bin/xlint/lint1/msg_122.c +++ b/tests/usr.bin/xlint/lint1/msg_122.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_122.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_122.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_122.c" // Test for message: shift amount %llu is greater than bit-size %llu of '%s' [122] +/* lint1-extra-flags: -X 351 */ + int example(int x) { diff --git a/tests/usr.bin/xlint/lint1/msg_125.c b/tests/usr.bin/xlint/lint1/msg_125.c index b4fe5833702..4570a7981e1 100644 --- a/tests/usr.bin/xlint/lint1/msg_125.c +++ b/tests/usr.bin/xlint/lint1/msg_125.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_125.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_125.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_125.c" // Test for message: ANSI C forbids ordered comparisons of pointers to functions [125] -/* lint1-extra-flags: -s */ +/* lint1-extra-flags: -s -X 351 */ typedef void (*action)(void); diff --git a/tests/usr.bin/xlint/lint1/msg_126.c b/tests/usr.bin/xlint/lint1/msg_126.c index c336059d59e..124aa007eee 100644 --- a/tests/usr.bin/xlint/lint1/msg_126.c +++ b/tests/usr.bin/xlint/lint1/msg_126.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_126.c,v 1.6 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_126.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_126.c" // Test for message: incompatible types '%s' and '%s' in conditional [126] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ int max(int cond, void *ptr, double dbl) diff --git a/tests/usr.bin/xlint/lint1/msg_128.c b/tests/usr.bin/xlint/lint1/msg_128.c index cd93367635d..3e9f90ab18e 100644 --- a/tests/usr.bin/xlint/lint1/msg_128.c +++ b/tests/usr.bin/xlint/lint1/msg_128.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_128.c,v 1.6 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_128.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_128.c" // Test for message: operands of '%s' have incompatible pointer types to '%s' and '%s' [128] +/* lint1-extra-flags: -X 351 */ + void conversion_to_unconst(const char *cstr) { diff --git a/tests/usr.bin/xlint/lint1/msg_132_lp64.c b/tests/usr.bin/xlint/lint1/msg_132_lp64.c index 6a11f5bebaf..21edfa041b7 100644 --- a/tests/usr.bin/xlint/lint1/msg_132_lp64.c +++ b/tests/usr.bin/xlint/lint1/msg_132_lp64.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_132_lp64.c,v 1.1 2022/06/10 18:29:01 rillig Exp $ */ +/* $NetBSD: msg_132_lp64.c,v 1.2 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_132_lp64.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] -/* lint1-extra-flags: -a */ +/* lint1-extra-flags: -a -X 351 */ /* lint1-only-if: lp64 */ unsigned int diff --git a/tests/usr.bin/xlint/lint1/msg_133.c b/tests/usr.bin/xlint/lint1/msg_133.c index 4ddf246affb..2fb432d0983 100644 --- a/tests/usr.bin/xlint/lint1/msg_133.c +++ b/tests/usr.bin/xlint/lint1/msg_133.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_133.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_133.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_133.c" // Test for message: conversion of pointer to '%s' loses bits [133] +/* lint1-extra-flags: -X 351 */ + char to_char(void *ptr) { diff --git a/tests/usr.bin/xlint/lint1/msg_136.c b/tests/usr.bin/xlint/lint1/msg_136.c index a1e0cc2a2ca..e322cd04e47 100644 --- a/tests/usr.bin/xlint/lint1/msg_136.c +++ b/tests/usr.bin/xlint/lint1/msg_136.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_136.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_136.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_136.c" // Test for message: cannot do pointer arithmetic on operand of unknown size [136] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: struct 'incomplete' never defined [233] */ struct incomplete; diff --git a/tests/usr.bin/xlint/lint1/msg_138.c b/tests/usr.bin/xlint/lint1/msg_138.c index bf99698c2ce..d57e72937b0 100644 --- a/tests/usr.bin/xlint/lint1/msg_138.c +++ b/tests/usr.bin/xlint/lint1/msg_138.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_138.c,v 1.5 2022/07/01 20:53:13 rillig Exp $ */ +/* $NetBSD: msg_138.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_138.c" // Test for message: unknown operand size, op '%s' [138] -/* lint1-extra-flags: -z */ +/* lint1-extra-flags: -z -X 351 */ struct incomplete; diff --git a/tests/usr.bin/xlint/lint1/msg_143.c b/tests/usr.bin/xlint/lint1/msg_143.c index fae7cb43a88..8d1d960e3d3 100644 --- a/tests/usr.bin/xlint/lint1/msg_143.c +++ b/tests/usr.bin/xlint/lint1/msg_143.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_143.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_143.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_143.c" // Test for message: cannot take size/alignment of incomplete type [143] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: struct 'incomplete' never defined [233] */ struct incomplete; diff --git a/tests/usr.bin/xlint/lint1/msg_144.c b/tests/usr.bin/xlint/lint1/msg_144.c index 3a6a5c98775..898252b5c45 100644 --- a/tests/usr.bin/xlint/lint1/msg_144.c +++ b/tests/usr.bin/xlint/lint1/msg_144.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_144.c,v 1.5 2022/04/01 23:16:32 rillig Exp $ */ +/* $NetBSD: msg_144.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_144.c" // Test for message: cannot take size/alignment of function type '%s' [144] +/* lint1-extra-flags: -X 351 */ + unsigned long example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_145.c b/tests/usr.bin/xlint/lint1/msg_145.c index 99254e60aca..400b6ece83c 100644 --- a/tests/usr.bin/xlint/lint1/msg_145.c +++ b/tests/usr.bin/xlint/lint1/msg_145.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_145.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_145.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_145.c" // Test for message: cannot take size/alignment of bit-field [145] +/* lint1-extra-flags: -X 351 */ + struct bits { unsigned one: 1; unsigned eight: 8; diff --git a/tests/usr.bin/xlint/lint1/msg_146.c b/tests/usr.bin/xlint/lint1/msg_146.c index 8112cc26ce8..d69bf50d8c4 100644 --- a/tests/usr.bin/xlint/lint1/msg_146.c +++ b/tests/usr.bin/xlint/lint1/msg_146.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_146.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_146.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_146.c" // Test for message: cannot take size/alignment of void [146] +/* lint1-extra-flags: -X 351 */ + unsigned long example(void *ptr) { diff --git a/tests/usr.bin/xlint/lint1/msg_149.c b/tests/usr.bin/xlint/lint1/msg_149.c index 7bac41d1744..af8bff72c7b 100644 --- a/tests/usr.bin/xlint/lint1/msg_149.c +++ b/tests/usr.bin/xlint/lint1/msg_149.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_149.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_149.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_149.c" // Test for message: cannot call '%s', must be a function [149] +/* lint1-extra-flags: -X 351 */ + void example(int i) { diff --git a/tests/usr.bin/xlint/lint1/msg_159.c b/tests/usr.bin/xlint/lint1/msg_159.c index 8af7d6d9e90..37216dff052 100644 --- a/tests/usr.bin/xlint/lint1/msg_159.c +++ b/tests/usr.bin/xlint/lint1/msg_159.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_159.c,v 1.6 2023/04/22 17:30:35 rillig Exp $ */ +/* $NetBSD: msg_159.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_159.c" // Test for message: assignment in conditional context [159] -/* lint1-extra-flags: -h */ +/* lint1-extra-flags: -h -X 351 */ const char * example(int a, int b) diff --git a/tests/usr.bin/xlint/lint1/msg_163.c b/tests/usr.bin/xlint/lint1/msg_163.c index 06460694bc1..8aa00846944 100644 --- a/tests/usr.bin/xlint/lint1/msg_163.c +++ b/tests/usr.bin/xlint/lint1/msg_163.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_163.c,v 1.4 2021/07/04 12:24:39 rillig Exp $ */ +/* $NetBSD: msg_163.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_163.c" // Test for message: a cast does not yield an lvalue [163] +/* lint1-extra-flags: -X 351 */ + void example(char *p, int i) { diff --git a/tests/usr.bin/xlint/lint1/msg_164.c b/tests/usr.bin/xlint/lint1/msg_164.c index 2b4751d2435..5eb121fa823 100644 --- a/tests/usr.bin/xlint/lint1/msg_164.c +++ b/tests/usr.bin/xlint/lint1/msg_164.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_164.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_164.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_164.c" // Test for message: assignment of negative constant to unsigned type [164] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_165.c b/tests/usr.bin/xlint/lint1/msg_165.c index e8fdd600a21..887f408ef63 100644 --- a/tests/usr.bin/xlint/lint1/msg_165.c +++ b/tests/usr.bin/xlint/lint1/msg_165.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_165.c,v 1.5 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_165.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_165.c" // Test for message: constant truncated by assignment [165] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_166.c b/tests/usr.bin/xlint/lint1/msg_166.c index 42ebf68c960..c35ceb038bd 100644 --- a/tests/usr.bin/xlint/lint1/msg_166.c +++ b/tests/usr.bin/xlint/lint1/msg_166.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_166.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_166.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_166.c" // Test for message: precision lost in bit-field assignment [166] -/* lint1-extra-flags: -hp */ +/* lint1-extra-flags: -hp -X 351 */ struct bit_set { diff --git a/tests/usr.bin/xlint/lint1/msg_167.c b/tests/usr.bin/xlint/lint1/msg_167.c index 382d13148c2..7a71a76ac82 100644 --- a/tests/usr.bin/xlint/lint1/msg_167.c +++ b/tests/usr.bin/xlint/lint1/msg_167.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_167.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_167.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_167.c" // Test for message: array subscript cannot be negative: %ld [167] +/* lint1-extra-flags: -X 351 */ + void example(int *ptr) { diff --git a/tests/usr.bin/xlint/lint1/msg_170.c b/tests/usr.bin/xlint/lint1/msg_170.c index effeff0b25a..01d7c517b11 100644 --- a/tests/usr.bin/xlint/lint1/msg_170.c +++ b/tests/usr.bin/xlint/lint1/msg_170.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_170.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_170.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_170.c" // Test for message: first operand must have scalar type, op ? : [170] +/* lint1-extra-flags: -X 351 */ + struct number { int value; }; diff --git a/tests/usr.bin/xlint/lint1/msg_171.c b/tests/usr.bin/xlint/lint1/msg_171.c index 5a37345cd48..54ae3e4bfae 100644 --- a/tests/usr.bin/xlint/lint1/msg_171.c +++ b/tests/usr.bin/xlint/lint1/msg_171.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_171.c,v 1.8 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_171.c,v 1.9 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_171.c" // Test for message: cannot assign to '%s' from '%s' [171] +/* lint1-extra-flags: -X 351 */ + struct s { int member; }; diff --git a/tests/usr.bin/xlint/lint1/msg_174.c b/tests/usr.bin/xlint/lint1/msg_174.c index d0d17eac3b1..62a1d5b06a4 100644 --- a/tests/usr.bin/xlint/lint1/msg_174.c +++ b/tests/usr.bin/xlint/lint1/msg_174.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_174.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_174.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_174.c" // Test for message: too many initializers [174] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_182.c b/tests/usr.bin/xlint/lint1/msg_182.c index 0b620ef9569..3eca521eb63 100644 --- a/tests/usr.bin/xlint/lint1/msg_182.c +++ b/tests/usr.bin/xlint/lint1/msg_182.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_182.c,v 1.5 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_182.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_182.c" // Test for message: incompatible pointer types to '%s' and '%s' [182] +/* lint1-extra-flags: -X 351 */ + void * return_discarding_volatile(volatile void *arg) { diff --git a/tests/usr.bin/xlint/lint1/msg_183.c b/tests/usr.bin/xlint/lint1/msg_183.c index 93e1910e608..eefef85e448 100644 --- a/tests/usr.bin/xlint/lint1/msg_183.c +++ b/tests/usr.bin/xlint/lint1/msg_183.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_183.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_183.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_183.c" // Test for message: illegal combination of %s '%s' and %s '%s' [183] +/* lint1-extra-flags: -X 351 */ + /* expect+2: warning: argument 'x' unused in function 'example' [231] */ void * example(double x, int i, void *vp, int *ip, double *dp, void (*fp)(void)) diff --git a/tests/usr.bin/xlint/lint1/msg_184.c b/tests/usr.bin/xlint/lint1/msg_184.c index 93b761f12b4..d019991f379 100644 --- a/tests/usr.bin/xlint/lint1/msg_184.c +++ b/tests/usr.bin/xlint/lint1/msg_184.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_184.c,v 1.5 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_184.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_184.c" // Test for message: illegal combination of '%s' and '%s' [184] +/* lint1-extra-flags: -X 351 */ + int * example(char *cp) { diff --git a/tests/usr.bin/xlint/lint1/msg_191.c b/tests/usr.bin/xlint/lint1/msg_191.c index 94769574912..0a24affb823 100644 --- a/tests/usr.bin/xlint/lint1/msg_191.c +++ b/tests/usr.bin/xlint/lint1/msg_191.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_191.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_191.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_191.c" // Test for message: '%s' set but not used in function '%s' [191] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_192.c b/tests/usr.bin/xlint/lint1/msg_192.c index b24c5bb77e8..7c0278dceac 100644 --- a/tests/usr.bin/xlint/lint1/msg_192.c +++ b/tests/usr.bin/xlint/lint1/msg_192.c @@ -1,10 +1,12 @@ -/* $NetBSD: msg_192.c,v 1.4 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_192.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_192.c" // Test for message: '%s' unused in function '%s' [192] -/* ARGSUSED */ +/* lint1-extra-flags: -X 351 */ + void +/* expect+1: warning: argument 'param' unused in function 'example' [231] */ example(int param) { /* expect+1: warning: 'local' unused in function 'example' [192] */ diff --git a/tests/usr.bin/xlint/lint1/msg_194.c b/tests/usr.bin/xlint/lint1/msg_194.c index ee3fe96186d..87fcb699944 100644 --- a/tests/usr.bin/xlint/lint1/msg_194.c +++ b/tests/usr.bin/xlint/lint1/msg_194.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_194.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_194.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_194.c" // Test for message: label '%s' redefined [194] +/* lint1-extra-flags: -X 351 */ + void example(void) { int i = 0; diff --git a/tests/usr.bin/xlint/lint1/msg_195.c b/tests/usr.bin/xlint/lint1/msg_195.c index 1817aec9f5c..fd2583baf9a 100644 --- a/tests/usr.bin/xlint/lint1/msg_195.c +++ b/tests/usr.bin/xlint/lint1/msg_195.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_195.c,v 1.3 2022/06/16 16:58:36 rillig Exp $ */ +/* $NetBSD: msg_195.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_195.c" // Test for message: case not in switch [195] +/* lint1-extra-flags: -X 351 */ + int example(int x) { diff --git a/tests/usr.bin/xlint/lint1/msg_200.c b/tests/usr.bin/xlint/lint1/msg_200.c index f846ffa8f67..d89d83dfc31 100644 --- a/tests/usr.bin/xlint/lint1/msg_200.c +++ b/tests/usr.bin/xlint/lint1/msg_200.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_200.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */ +/* $NetBSD: msg_200.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_200.c" // Test for message: duplicate case in switch: %lu [200] +/* lint1-extra-flags: -X 351 */ + void example(unsigned x) { diff --git a/tests/usr.bin/xlint/lint1/msg_201.c b/tests/usr.bin/xlint/lint1/msg_201.c index c10119e285f..95170cd21b4 100644 --- a/tests/usr.bin/xlint/lint1/msg_201.c +++ b/tests/usr.bin/xlint/lint1/msg_201.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_201.c,v 1.3 2021/08/26 19:23:25 rillig Exp $ */ +/* $NetBSD: msg_201.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_201.c" // Test for message: default outside switch [201] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_202.c b/tests/usr.bin/xlint/lint1/msg_202.c index 3a5d04a61c9..9238c25da94 100644 --- a/tests/usr.bin/xlint/lint1/msg_202.c +++ b/tests/usr.bin/xlint/lint1/msg_202.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_202.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_202.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_202.c" // Test for message: duplicate default in switch [202] +/* lint1-extra-flags: -X 351 */ + void example(int x) { diff --git a/tests/usr.bin/xlint/lint1/msg_205.c b/tests/usr.bin/xlint/lint1/msg_205.c index dfc22a32e7d..c04c74b9cd1 100644 --- a/tests/usr.bin/xlint/lint1/msg_205.c +++ b/tests/usr.bin/xlint/lint1/msg_205.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_205.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_205.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_205.c" // Test for message: switch expression must have integral type [205] +/* lint1-extra-flags: -X 351 */ + /* ARGSUSED */ void example(double x) diff --git a/tests/usr.bin/xlint/lint1/msg_206.c b/tests/usr.bin/xlint/lint1/msg_206.c index 309d2b456fc..94056b8caac 100644 --- a/tests/usr.bin/xlint/lint1/msg_206.c +++ b/tests/usr.bin/xlint/lint1/msg_206.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_206.c,v 1.6 2022/05/22 13:58:59 rillig Exp $ */ +/* $NetBSD: msg_206.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_206.c" // Test for message: enumeration value(s) not handled in switch [206] -/* lint1-extra-flags: -eh */ +/* lint1-extra-flags: -eh -X 351 */ enum number { ONE, TWO, THREE diff --git a/tests/usr.bin/xlint/lint1/msg_209.c b/tests/usr.bin/xlint/lint1/msg_209.c index 6bf74c6ddcd..ca2a8ec235a 100644 --- a/tests/usr.bin/xlint/lint1/msg_209.c +++ b/tests/usr.bin/xlint/lint1/msg_209.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_209.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_209.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_209.c" // Test for message: continue outside loop [209] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_211.c b/tests/usr.bin/xlint/lint1/msg_211.c index 7141c1dc0cd..12ab697bf2d 100644 --- a/tests/usr.bin/xlint/lint1/msg_211.c +++ b/tests/usr.bin/xlint/lint1/msg_211.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_211.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_211.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_211.c" // Test for message: function has return type '%s' but returns '%s' [211] +/* lint1-extra-flags: -X 351 */ + struct str { int member; }; diff --git a/tests/usr.bin/xlint/lint1/msg_213.c b/tests/usr.bin/xlint/lint1/msg_213.c index f9493528617..b9c8195e778 100644 --- a/tests/usr.bin/xlint/lint1/msg_213.c +++ b/tests/usr.bin/xlint/lint1/msg_213.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_213.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_213.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_213.c" // Test for message: void function '%s' cannot return value [213] +/* lint1-extra-flags: -X 351 */ + /* expect+2: warning: argument 'x' unused in function 'example' [231] */ void example(int x) diff --git a/tests/usr.bin/xlint/lint1/msg_214.c b/tests/usr.bin/xlint/lint1/msg_214.c index e4f6223e66b..2eaf5aef5d5 100644 --- a/tests/usr.bin/xlint/lint1/msg_214.c +++ b/tests/usr.bin/xlint/lint1/msg_214.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_214.c,v 1.4 2021/08/03 18:44:33 rillig Exp $ */ +/* $NetBSD: msg_214.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_214.c" // Test for message: function '%s' expects to return value [214] +/* lint1-extra-flags: -X 351 */ + int int_function(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_215.c b/tests/usr.bin/xlint/lint1/msg_215.c index 6c6d6b599d3..68020a24972 100644 --- a/tests/usr.bin/xlint/lint1/msg_215.c +++ b/tests/usr.bin/xlint/lint1/msg_215.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_215.c,v 1.12 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_215.c,v 1.13 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_215.c" // Test for message: function '%s' implicitly declared to return int [215] @@ -9,6 +9,8 @@ * would then be defined as taking unspecified parameters and returning int. */ +/* lint1-extra-flags: -X 351 */ + struct str { int dummy; }; diff --git a/tests/usr.bin/xlint/lint1/msg_216.c b/tests/usr.bin/xlint/lint1/msg_216.c index 0d211fc73a6..628d2b17f06 100644 --- a/tests/usr.bin/xlint/lint1/msg_216.c +++ b/tests/usr.bin/xlint/lint1/msg_216.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_216.c,v 1.6 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_216.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_216.c" // Test for message: function '%s' has 'return expr' and 'return' [216] +/* lint1-extra-flags: -X 351 */ + /* expect+2: error: old-style declaration; add 'int' [1] */ random(int n) { diff --git a/tests/usr.bin/xlint/lint1/msg_217.c b/tests/usr.bin/xlint/lint1/msg_217.c index f28589233c4..97bf077be84 100644 --- a/tests/usr.bin/xlint/lint1/msg_217.c +++ b/tests/usr.bin/xlint/lint1/msg_217.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_217.c,v 1.11 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_217.c,v 1.12 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_217.c" // Test for message: function '%s' falls off bottom without returning value [217] +/* lint1-extra-flags: -X 351 */ + int random(int n) { diff --git a/tests/usr.bin/xlint/lint1/msg_223.c b/tests/usr.bin/xlint/lint1/msg_223.c index 418426a03e1..c48326a8402 100644 --- a/tests/usr.bin/xlint/lint1/msg_223.c +++ b/tests/usr.bin/xlint/lint1/msg_223.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_223.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_223.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_223.c" // Test for message: end-of-loop code not reached [223] +/* lint1-extra-flags: -X 351 */ + void example(int n) { diff --git a/tests/usr.bin/xlint/lint1/msg_224.c b/tests/usr.bin/xlint/lint1/msg_224.c index 1e758f738c2..e5912e92732 100644 --- a/tests/usr.bin/xlint/lint1/msg_224.c +++ b/tests/usr.bin/xlint/lint1/msg_224.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_224.c,v 1.4 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_224.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_224.c" // Test for message: cannot recover from previous errors [224] +/* lint1-extra-flags: -X 351 */ + /* expect+1: error: syntax error 'error' [249] */ void example1(void) { "syntax" error; } /* expect+1: error: syntax error 'error' [249] */ diff --git a/tests/usr.bin/xlint/lint1/msg_225.c b/tests/usr.bin/xlint/lint1/msg_225.c index 0ec86751d28..1dbac48e599 100644 --- a/tests/usr.bin/xlint/lint1/msg_225.c +++ b/tests/usr.bin/xlint/lint1/msg_225.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_225.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_225.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_225.c" // Test for message: static function '%s' called but not defined [225] +/* lint1-extra-flags: -X 351 */ + static void undefined(void); static void defined_later(void); diff --git a/tests/usr.bin/xlint/lint1/msg_228.c b/tests/usr.bin/xlint/lint1/msg_228.c index 8cdefa8e4cc..ee525610456 100644 --- a/tests/usr.bin/xlint/lint1/msg_228.c +++ b/tests/usr.bin/xlint/lint1/msg_228.c @@ -1,10 +1,10 @@ -/* $NetBSD: msg_228.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_228.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_228.c" /* Test for message: function cannot return const or volatile object [228] */ /* TODO: Also warn in C99 mode and later. */ -/* lint1-flags: -sw */ +/* lint1-flags: -sw -X 351 */ const int return_const_int(void) diff --git a/tests/usr.bin/xlint/lint1/msg_229.c b/tests/usr.bin/xlint/lint1/msg_229.c index bf17536a6cf..07052adeb26 100644 --- a/tests/usr.bin/xlint/lint1/msg_229.c +++ b/tests/usr.bin/xlint/lint1/msg_229.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_229.c,v 1.6 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_229.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_229.c" // Test for message: converting '%s' to '%s' is questionable [229] +/* lint1-extra-flags: -X 351 */ + typedef double (*unary_operator)(double); int * diff --git a/tests/usr.bin/xlint/lint1/msg_230.c b/tests/usr.bin/xlint/lint1/msg_230.c index 24586a49aa0..7b48d3d50bc 100644 --- a/tests/usr.bin/xlint/lint1/msg_230.c +++ b/tests/usr.bin/xlint/lint1/msg_230.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_230.c,v 1.13 2023/06/24 17:50:31 rillig Exp $ */ +/* $NetBSD: msg_230.c,v 1.14 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_230.c" // Test for message: nonportable character comparison '%s' [230] -/* lint1-flags: -S -g -p -w */ +/* lint1-flags: -S -g -p -w -X 351 */ /* lint1-only-if: schar */ /* diff --git a/tests/usr.bin/xlint/lint1/msg_231.c b/tests/usr.bin/xlint/lint1/msg_231.c index 01a553c959e..19ceaafa7e9 100644 --- a/tests/usr.bin/xlint/lint1/msg_231.c +++ b/tests/usr.bin/xlint/lint1/msg_231.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_231.c,v 1.4 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_231.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_231.c" // Test for message: argument '%s' unused in function '%s' [231] +/* lint1-extra-flags: -X 351 */ + /* expect+2: warning: argument 'param' unused in function 'example' [231] */ void example(int param) diff --git a/tests/usr.bin/xlint/lint1/msg_232.c b/tests/usr.bin/xlint/lint1/msg_232.c index 7fc4f3b821e..5211b19ac6a 100644 --- a/tests/usr.bin/xlint/lint1/msg_232.c +++ b/tests/usr.bin/xlint/lint1/msg_232.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_232.c,v 1.6 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_232.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_232.c" // Test for message: label '%s' unused in function '%s' [232] +/* lint1-extra-flags: -X 351 */ + void example(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_236.c b/tests/usr.bin/xlint/lint1/msg_236.c index 7d5e6b3ed24..39256006557 100644 --- a/tests/usr.bin/xlint/lint1/msg_236.c +++ b/tests/usr.bin/xlint/lint1/msg_236.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_236.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: msg_236.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_236.c" // Test for message: static function '%s' unused [236] +/* lint1-extra-flags: -X 351 */ + void external_function(void) { @@ -13,3 +15,8 @@ static void static_function(void) { } + +static inline void +inline_function(void) +{ +} diff --git a/tests/usr.bin/xlint/lint1/msg_237.c b/tests/usr.bin/xlint/lint1/msg_237.c index e524d4d9a28..b44e4e0920d 100644 --- a/tests/usr.bin/xlint/lint1/msg_237.c +++ b/tests/usr.bin/xlint/lint1/msg_237.c @@ -1,10 +1,12 @@ -/* $NetBSD: msg_237.c,v 1.3 2022/06/11 12:24:00 rillig Exp $ */ +/* $NetBSD: msg_237.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_237.c" // Test for message: redeclaration of formal parameter '%s' [237] /* See also message 21, which has the same text. */ +/* lint1-extra-flags: -X 351 */ + /*ARGSUSED*/ void /* expect+1: error: redeclaration of formal parameter 'param' [237] */ diff --git a/tests/usr.bin/xlint/lint1/msg_239.c b/tests/usr.bin/xlint/lint1/msg_239.c index 0d70f1d0431..9d1eaf317eb 100644 --- a/tests/usr.bin/xlint/lint1/msg_239.c +++ b/tests/usr.bin/xlint/lint1/msg_239.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_239.c,v 1.6 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_239.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_239.c" // Test for message: constant argument to '!' [239] -/* lint1-extra-flags: -h */ +/* lint1-extra-flags: -h -X 351 */ _Bool example(int n) diff --git a/tests/usr.bin/xlint/lint1/msg_240.c b/tests/usr.bin/xlint/lint1/msg_240.c index a697a66d65a..aa078dcd396 100644 --- a/tests/usr.bin/xlint/lint1/msg_240.c +++ b/tests/usr.bin/xlint/lint1/msg_240.c @@ -1,9 +1,11 @@ -/* $NetBSD: msg_240.c,v 1.5 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_240.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_240.c" // Test for message: assignment of different structures (%s != %s) [240] // This message is not used. +/* lint1-extra-flags: -X 351 */ + struct s_arg { int member; }; diff --git a/tests/usr.bin/xlint/lint1/msg_244.c b/tests/usr.bin/xlint/lint1/msg_244.c index f9f1fa93bbe..8b015b7788f 100644 --- a/tests/usr.bin/xlint/lint1/msg_244.c +++ b/tests/usr.bin/xlint/lint1/msg_244.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_244.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_244.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_244.c" // Test for message: illegal structure pointer combination [244] +/* lint1-extra-flags: -X 351 */ + struct a { int member; }; diff --git a/tests/usr.bin/xlint/lint1/msg_246.c b/tests/usr.bin/xlint/lint1/msg_246.c index b8e0ef8d1fb..d102238fc03 100644 --- a/tests/usr.bin/xlint/lint1/msg_246.c +++ b/tests/usr.bin/xlint/lint1/msg_246.c @@ -1,9 +1,11 @@ -/* $NetBSD: msg_246.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_246.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_246.c" // Test for message: dubious conversion of enum to '%s' [246] // This message is not used. +/* lint1-extra-flags: -X 351 */ + enum color { RED, GREEN, BLUE }; diff --git a/tests/usr.bin/xlint/lint1/msg_261.c b/tests/usr.bin/xlint/lint1/msg_261.c index e6f1a550480..972b7456c53 100644 --- a/tests/usr.bin/xlint/lint1/msg_261.c +++ b/tests/usr.bin/xlint/lint1/msg_261.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_261.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_261.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_261.c" // Test for message: previous definition of '%s' [261] -/* lint1-extra-flags: -r */ +/* lint1-extra-flags: -r -X 351 */ /* expect+2: previous definition of 'function' [261] */ void diff --git a/tests/usr.bin/xlint/lint1/msg_267.c b/tests/usr.bin/xlint/lint1/msg_267.c index 3e9aa84133b..296ea4fec48 100644 --- a/tests/usr.bin/xlint/lint1/msg_267.c +++ b/tests/usr.bin/xlint/lint1/msg_267.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_267.c,v 1.6 2022/08/19 19:40:39 rillig Exp $ */ +/* $NetBSD: msg_267.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_267.c" // Test for message: shift amount %u equals bit-size of '%s' [267] +/* lint1-extra-flags: -X 351 */ + int shr32(unsigned int x) { diff --git a/tests/usr.bin/xlint/lint1/msg_268.c b/tests/usr.bin/xlint/lint1/msg_268.c index 1d182f9def9..8d20e82d713 100644 --- a/tests/usr.bin/xlint/lint1/msg_268.c +++ b/tests/usr.bin/xlint/lint1/msg_268.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_268.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: msg_268.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_268.c" // Test for message: variable '%s' declared inline [268] +/* lint1-extra-flags: -X 351 */ + int example(int arg) { diff --git a/tests/usr.bin/xlint/lint1/msg_274.c b/tests/usr.bin/xlint/lint1/msg_274.c index 20629f660b0..00a21db0638 100644 --- a/tests/usr.bin/xlint/lint1/msg_274.c +++ b/tests/usr.bin/xlint/lint1/msg_274.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_274.c,v 1.3 2021/08/22 13:45:56 rillig Exp $ */ +/* $NetBSD: msg_274.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_274.c" /* Test for message: ANSI C forbids comparison of %s with %s [274] */ -/* lint1-flags: -sw */ +/* lint1-flags: -sw -X 351 */ void example(void (*function_pointer)(void), void *void_pointer) diff --git a/tests/usr.bin/xlint/lint1/msg_275.c b/tests/usr.bin/xlint/lint1/msg_275.c index 932d331b95d..18e1468488c 100644 --- a/tests/usr.bin/xlint/lint1/msg_275.c +++ b/tests/usr.bin/xlint/lint1/msg_275.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_275.c,v 1.5 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_275.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_275.c" // Test for message: cast discards 'const' from type '%s' [275] -/* lint1-extra-flags: -h */ +/* lint1-extra-flags: -h -X 351 */ char * unconst_string(const char *s) diff --git a/tests/usr.bin/xlint/lint1/msg_280.c b/tests/usr.bin/xlint/lint1/msg_280.c index 7eef652112a..03c272a4794 100644 --- a/tests/usr.bin/xlint/lint1/msg_280.c +++ b/tests/usr.bin/xlint/lint1/msg_280.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_280.c,v 1.6 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_280.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_280.c" // Test for message: comment /* %s */ must be outside function [280] +/* lint1-extra-flags: -X 351 */ + /* VARARGS */ void varargs_ok(const char *str, ...) diff --git a/tests/usr.bin/xlint/lint1/msg_281.c b/tests/usr.bin/xlint/lint1/msg_281.c index 36eed4ea96a..19a5d33c3d4 100644 --- a/tests/usr.bin/xlint/lint1/msg_281.c +++ b/tests/usr.bin/xlint/lint1/msg_281.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_281.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_281.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_281.c" // Test for message: duplicate comment /* %s */ [281] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: duplicate comment ** ARGSUSED ** [281] */ /* ARGSUSED *//* ARGSUSED */ void args_used(int x) diff --git a/tests/usr.bin/xlint/lint1/msg_283.c b/tests/usr.bin/xlint/lint1/msg_283.c index 4203e2c583d..1c265b8cea9 100644 --- a/tests/usr.bin/xlint/lint1/msg_283.c +++ b/tests/usr.bin/xlint/lint1/msg_283.c @@ -1,10 +1,10 @@ -/* $NetBSD: msg_283.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_283.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_283.c" // Test for message: argument number mismatch with directive /* %s */ [283] /* Do not warn about unused parameters. */ -/* lint1-extra-flags: -X 231 */ +/* lint1-extra-flags: -X 231,351 */ /* PRINTFLIKE */ void diff --git a/tests/usr.bin/xlint/lint1/msg_288.c b/tests/usr.bin/xlint/lint1/msg_288.c index 4f82a868ec6..c3dffeb98e9 100644 --- a/tests/usr.bin/xlint/lint1/msg_288.c +++ b/tests/usr.bin/xlint/lint1/msg_288.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_288.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_288.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_288.c" // Test for message: dubious use of /* VARARGS */ with /* %s */ [288] +/* lint1-extra-flags: -X 351 */ + /* VARARGS */ int just_varargs(char x) diff --git a/tests/usr.bin/xlint/lint1/msg_289.c b/tests/usr.bin/xlint/lint1/msg_289.c index 6eed79fafcd..6962b26615d 100644 --- a/tests/usr.bin/xlint/lint1/msg_289.c +++ b/tests/usr.bin/xlint/lint1/msg_289.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_289.c,v 1.4 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_289.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_289.c" // Test for message: can't be used together: /* PRINTFLIKE */ /* SCANFLIKE */ [289] +/* lint1-extra-flags: -X 351 */ + /* PRINTFLIKE */ /* SCANFLIKE */ void both(void) diff --git a/tests/usr.bin/xlint/lint1/msg_290.c b/tests/usr.bin/xlint/lint1/msg_290.c index 852bad4efd6..e1f68f167c2 100644 --- a/tests/usr.bin/xlint/lint1/msg_290.c +++ b/tests/usr.bin/xlint/lint1/msg_290.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_290.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_290.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_290.c" // Test for message: static function '%s' declared but not defined [290] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: static function 'only_declared' declared but not defined [290] */ static void only_declared(void); static void declared_and_called(void); diff --git a/tests/usr.bin/xlint/lint1/msg_293.c b/tests/usr.bin/xlint/lint1/msg_293.c index 870846c26ad..b38796a5108 100644 --- a/tests/usr.bin/xlint/lint1/msg_293.c +++ b/tests/usr.bin/xlint/lint1/msg_293.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_293.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */ +/* $NetBSD: msg_293.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_293.c" // Test for message: argument %d must be 'char *' for PRINTFLIKE/SCANFLIKE [293] +/* lint1-extra-flags: -X 351 */ + /* expect+3: warning: argument 1 must be 'char *' for PRINTFLIKE/SCANFLIKE [293] */ /* expect+2: warning: argument 'msgid' unused in function 'my_printf' [231] */ /* PRINTFLIKE 1 */ diff --git a/tests/usr.bin/xlint/lint1/msg_299.c b/tests/usr.bin/xlint/lint1/msg_299.c index b8c4312b653..37f6df3504c 100644 --- a/tests/usr.bin/xlint/lint1/msg_299.c +++ b/tests/usr.bin/xlint/lint1/msg_299.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_299.c,v 1.4 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_299.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_299.c" /* Test for message: prototype does not match old-style definition, arg #%d [299] */ -/* lint1-flags: -w */ +/* lint1-flags: -w -X 351 */ old_style(x) double x; diff --git a/tests/usr.bin/xlint/lint1/msg_300.c b/tests/usr.bin/xlint/lint1/msg_300.c index 4e4310dcf71..48462a24d51 100644 --- a/tests/usr.bin/xlint/lint1/msg_300.c +++ b/tests/usr.bin/xlint/lint1/msg_300.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_300.c,v 1.4 2022/10/01 09:42:40 rillig Exp $ */ +/* $NetBSD: msg_300.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_300.c" /* Test for message: old-style definition [300] */ -/* lint1-flags: -wr */ +/* lint1-flags: -wr -X 351 */ /* expect+1: old-style definition [300] */ old_style(x) diff --git a/tests/usr.bin/xlint/lint1/msg_302.c b/tests/usr.bin/xlint/lint1/msg_302.c index df3d236580f..b924ffcea44 100644 --- a/tests/usr.bin/xlint/lint1/msg_302.c +++ b/tests/usr.bin/xlint/lint1/msg_302.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_302.c,v 1.7 2023/04/15 12:59:02 rillig Exp $ */ +/* $NetBSD: msg_302.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_302.c" // Test for message: '%s' returns pointer to automatic object [302] +/* lint1-extra-flags: -X 351 */ + void * return_arg(int arg) { diff --git a/tests/usr.bin/xlint/lint1/msg_306.c b/tests/usr.bin/xlint/lint1/msg_306.c index d719a7c153f..473d4ec25a5 100644 --- a/tests/usr.bin/xlint/lint1/msg_306.c +++ b/tests/usr.bin/xlint/lint1/msg_306.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_306.c,v 1.4 2022/06/22 19:23:18 rillig Exp $ */ +/* $NetBSD: msg_306.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_306.c" // Test for message: constant truncated by conversion, op '%s' [306] +/* lint1-extra-flags: -X 351 */ + unsigned char to_u8(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_307.c b/tests/usr.bin/xlint/lint1/msg_307.c index 683f5015a4d..cd4931546b1 100644 --- a/tests/usr.bin/xlint/lint1/msg_307.c +++ b/tests/usr.bin/xlint/lint1/msg_307.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_307.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: msg_307.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_307.c" // Test for message: static variable '%s' set but not used [307] +/* lint1-extra-flags: -X 351 */ + /* expect+1: warning: static variable 'set_but_not_used' set but not used [307] */ static int set_but_not_used; diff --git a/tests/usr.bin/xlint/lint1/msg_309.c b/tests/usr.bin/xlint/lint1/msg_309.c index 298a764e105..16bfd409668 100644 --- a/tests/usr.bin/xlint/lint1/msg_309.c +++ b/tests/usr.bin/xlint/lint1/msg_309.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_309.c,v 1.6 2022/10/15 21:19:15 rillig Exp $ */ +/* $NetBSD: msg_309.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_309.c" // Test for message: extra bits set to 0 in conversion of '%s' to '%s', op '%s' [309] +/* lint1-extra-flags: -X 351 */ + int scale(unsigned long long x) { diff --git a/tests/usr.bin/xlint/lint1/msg_310.c b/tests/usr.bin/xlint/lint1/msg_310.c index d2cb1883c9a..0c256052595 100644 --- a/tests/usr.bin/xlint/lint1/msg_310.c +++ b/tests/usr.bin/xlint/lint1/msg_310.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_310.c,v 1.3 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_310.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_310.c" // Test for message: symbol renaming can't be used on function arguments [310] +/* lint1-extra-flags: -X 351 */ + /* expect+2: warning: argument 'callback' unused in function 'function' [231] */ void function(int (*callback)(void) __symbolrename(argument)) diff --git a/tests/usr.bin/xlint/lint1/msg_311.c b/tests/usr.bin/xlint/lint1/msg_311.c index 5e8dd134376..a606072c4e0 100644 --- a/tests/usr.bin/xlint/lint1/msg_311.c +++ b/tests/usr.bin/xlint/lint1/msg_311.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_311.c,v 1.3 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_311.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_311.c" // Test for message: symbol renaming can't be used on automatic variables [311] +/* lint1-extra-flags: -X 351 */ + typedef int (*callback)(void); callback diff --git a/tests/usr.bin/xlint/lint1/msg_314.c b/tests/usr.bin/xlint/lint1/msg_314.c index c7ee071c970..afcae7b02a6 100644 --- a/tests/usr.bin/xlint/lint1/msg_314.c +++ b/tests/usr.bin/xlint/lint1/msg_314.c @@ -1,9 +1,11 @@ -/* $NetBSD: msg_314.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */ +/* $NetBSD: msg_314.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_314.c" // Test for message: '%s' is not a structure or a union [314] /* This message is not used. */ +/* lint1-extra-flags: -X 351 */ + /* * Added in err.c 1.20 from 2002-10-21 when adding support for C99's * designated initializers, but never actually used. diff --git a/tests/usr.bin/xlint/lint1/msg_317.c b/tests/usr.bin/xlint/lint1/msg_317.c index b483ef2f6d1..9fcde94a6ca 100644 --- a/tests/usr.bin/xlint/lint1/msg_317.c +++ b/tests/usr.bin/xlint/lint1/msg_317.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_317.c,v 1.4 2022/02/27 12:00:27 rillig Exp $ */ +/* $NetBSD: msg_317.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_317.c" /* Test for message: __func__ is a C99 feature [317] */ -/* lint1-flags: -sw */ +/* lint1-flags: -sw -X 351 */ const char * function(void) diff --git a/tests/usr.bin/xlint/lint1/msg_318.c b/tests/usr.bin/xlint/lint1/msg_318.c index 5025fff1efd..2395a6f2e12 100644 --- a/tests/usr.bin/xlint/lint1/msg_318.c +++ b/tests/usr.bin/xlint/lint1/msg_318.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_318.c,v 1.3 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_318.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_318.c" // Test for message: variable array dimension is a C99/GCC extension [318] -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ unsigned long example(int n) diff --git a/tests/usr.bin/xlint/lint1/msg_320.c b/tests/usr.bin/xlint/lint1/msg_320.c index a856fd975da..9f684f7dfbc 100644 --- a/tests/usr.bin/xlint/lint1/msg_320.c +++ b/tests/usr.bin/xlint/lint1/msg_320.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_320.c,v 1.3 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_320.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_320.c" // Test for message: ({ }) is a GCC extension [320] -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ int example(void) diff --git a/tests/usr.bin/xlint/lint1/msg_324.c b/tests/usr.bin/xlint/lint1/msg_324.c index 5dd0d7e8aad..45da61f53cb 100644 --- a/tests/usr.bin/xlint/lint1/msg_324.c +++ b/tests/usr.bin/xlint/lint1/msg_324.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_324.c,v 1.8 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: msg_324.c,v 1.9 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_324.c" // Test for message: suggest cast from '%s' to '%s' on op '%s' to avoid overflow [324] @@ -14,7 +14,7 @@ * have been lost. */ -/* lint1-flags: -g -S -w -P */ +/* lint1-flags: -g -S -w -P -X 351 */ void example(char c, int i, unsigned u) diff --git a/tests/usr.bin/xlint/lint1/msg_328.c b/tests/usr.bin/xlint/lint1/msg_328.c index 2927183de69..176cce61043 100644 --- a/tests/usr.bin/xlint/lint1/msg_328.c +++ b/tests/usr.bin/xlint/lint1/msg_328.c @@ -1,9 +1,9 @@ -/* $NetBSD: msg_328.c,v 1.3 2021/08/03 20:57:06 rillig Exp $ */ +/* $NetBSD: msg_328.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_328.c" // Test for message: union cast is a GCC extension [328] -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ union target { int b; diff --git a/tests/usr.bin/xlint/lint1/msg_329.c b/tests/usr.bin/xlint/lint1/msg_329.c index a64e18f4bef..6683861460b 100644 --- a/tests/usr.bin/xlint/lint1/msg_329.c +++ b/tests/usr.bin/xlint/lint1/msg_329.c @@ -1,8 +1,10 @@ -/* $NetBSD: msg_329.c,v 1.4 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_329.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_329.c" // Test for message: type '%s' is not a member of '%s' [329] +/* lint1-extra-flags: -X 351 */ + union u { int i1; int i2; diff --git a/tests/usr.bin/xlint/lint1/msg_333.c b/tests/usr.bin/xlint/lint1/msg_333.c index ca82b108f81..7143d817a66 100644 --- a/tests/usr.bin/xlint/lint1/msg_333.c +++ b/tests/usr.bin/xlint/lint1/msg_333.c @@ -1,11 +1,11 @@ -/* $NetBSD: msg_333.c,v 1.6 2023/05/11 08:01:36 rillig Exp $ */ +/* $NetBSD: msg_333.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_333.c" // Test for message: controlling expression must be bool, not '%s' [333] // // See d_c99_bool_strict.c for many more examples. -/* lint1-extra-flags: -T */ +/* lint1-extra-flags: -T -X 351 */ typedef _Bool bool; diff --git a/tests/usr.bin/xlint/lint1/msg_335.c b/tests/usr.bin/xlint/lint1/msg_335.c index c8ae82d218c..687d648160d 100644 --- a/tests/usr.bin/xlint/lint1/msg_335.c +++ b/tests/usr.bin/xlint/lint1/msg_335.c @@ -1,11 +1,11 @@ -/* $NetBSD: msg_335.c,v 1.2 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_335.c,v 1.3 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_335.c" // Test for message: operand of '%s' must not be bool [335] // // See d_c99_bool_strict.c for many more examples. -/* lint1-extra-flags: -T */ +/* lint1-extra-flags: -T -X 351 */ typedef _Bool bool; diff --git a/tests/usr.bin/xlint/lint1/msg_340.c b/tests/usr.bin/xlint/lint1/msg_340.c index 3aa734b463a..bdef8bd20f2 100644 --- a/tests/usr.bin/xlint/lint1/msg_340.c +++ b/tests/usr.bin/xlint/lint1/msg_340.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_340.c,v 1.4 2022/06/17 06:59:16 rillig Exp $ */ +/* $NetBSD: msg_340.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_340.c" // Test for message: initialization with '[a...b]' is a GCC extension [340] @@ -7,7 +7,7 @@ * In strict C mode, GCC extensions are flagged as such. */ -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ int example(void) diff --git a/tests/usr.bin/xlint/lint1/msg_345.c b/tests/usr.bin/xlint/lint1/msg_345.c index dd12819fd3b..3f75610239c 100644 --- a/tests/usr.bin/xlint/lint1/msg_345.c +++ b/tests/usr.bin/xlint/lint1/msg_345.c @@ -1,10 +1,10 @@ -/* $NetBSD: msg_345.c,v 1.3 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: msg_345.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_345.c" // Test for message: generic selection requires C11 or later [345] /* Omit flag -g since it silences c11ism. */ -/* lint1-flags: -Sw */ +/* lint1-flags: -Sw -X 351 */ int test(int x) diff --git a/tests/usr.bin/xlint/lint1/msg_350.c b/tests/usr.bin/xlint/lint1/msg_350.c index 5260be67baf..8c53390f071 100644 --- a/tests/usr.bin/xlint/lint1/msg_350.c +++ b/tests/usr.bin/xlint/lint1/msg_350.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_350.c,v 1.2 2023/07/07 00:20:39 rillig Exp $ */ +/* $NetBSD: msg_350.c,v 1.3 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_350.c" // Test for message 350: '_Atomic' requires C11 or later [350] @@ -11,6 +11,8 @@ * c11_atomic.c */ +/* lint1-extra-flags: -X 351 */ + /* expect+1: error: '_Atomic' requires C11 or later [350] */ typedef _Atomic int atomic_int; diff --git a/tests/usr.bin/xlint/lint1/msg_351.c b/tests/usr.bin/xlint/lint1/msg_351.c index f6842eab1ec..8e38820340c 100644 --- a/tests/usr.bin/xlint/lint1/msg_351.c +++ b/tests/usr.bin/xlint/lint1/msg_351.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_351.c,v 1.6 2023/07/07 00:25:23 rillig Exp $ */ +/* $NetBSD: msg_351.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_351.c" // Test for message 351: missing%s header declaration for '%s' [351] @@ -23,13 +23,13 @@ void func_decl(void); extern void extern_func_decl(void); static int static_func_decl(void); -// TODO: missing header declaration +/* expect+3: warning: missing header declaration for 'func_def' [351] */ void func_def(void) { } -// TODO: missing header declaration +/* expect+3: warning: missing header declaration for 'extern_func_def' [351] */ extern void extern_func_def(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_352.c b/tests/usr.bin/xlint/lint1/msg_352.c index 1b0f864a737..9a6465a94f1 100644 --- a/tests/usr.bin/xlint/lint1/msg_352.c +++ b/tests/usr.bin/xlint/lint1/msg_352.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_352.c,v 1.1 2023/03/28 20:04:52 rillig Exp $ */ +/* $NetBSD: msg_352.c,v 1.2 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_352.c" // Test for message 352: nested 'extern' declaration of '%s' [352] @@ -10,6 +10,8 @@ * Instead, any external functions or objects should be declared in headers. */ +/* lint1-extra-flags: -X 351 */ + int function(void) { diff --git a/tests/usr.bin/xlint/lint1/msg_353.c b/tests/usr.bin/xlint/lint1/msg_353.c index 4b0d67bd18d..08d68573fe7 100644 --- a/tests/usr.bin/xlint/lint1/msg_353.c +++ b/tests/usr.bin/xlint/lint1/msg_353.c @@ -1,4 +1,4 @@ -/* $NetBSD: msg_353.c,v 1.2 2023/07/03 09:33:07 rillig Exp $ */ +/* $NetBSD: msg_353.c,v 1.3 2023/07/07 19:45:22 rillig Exp $ */ # 3 "msg_353.c" // Test for message 353: empty initializer braces require C23 or later [353] @@ -6,7 +6,7 @@ // See also: // c23.c -/* lint1-extra-flags: -Ac11 */ +/* lint1-extra-flags: -Ac11 -X 351 */ void c23(void) diff --git a/tests/usr.bin/xlint/lint1/stmt_for.c b/tests/usr.bin/xlint/lint1/stmt_for.c index df5b1cccfc4..cc5ff61f70f 100644 --- a/tests/usr.bin/xlint/lint1/stmt_for.c +++ b/tests/usr.bin/xlint/lint1/stmt_for.c @@ -1,4 +1,4 @@ -/* $NetBSD: stmt_for.c,v 1.3 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: stmt_for.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ # 3 "stmt_for.c" /* @@ -7,6 +7,8 @@ * "dcs->d_next == NULL" failed in funcend at func.c:422 */ +/* lint1-extra-flags: -X 351 */ + void test(void) { diff --git a/tests/usr.bin/xlint/lint1/stmt_goto.c b/tests/usr.bin/xlint/lint1/stmt_goto.c index 6575416ed3a..442dc88efca 100644 --- a/tests/usr.bin/xlint/lint1/stmt_goto.c +++ b/tests/usr.bin/xlint/lint1/stmt_goto.c @@ -1,10 +1,12 @@ -/* $NetBSD: stmt_goto.c,v 1.2 2022/06/17 18:54:53 rillig Exp $ */ +/* $NetBSD: stmt_goto.c,v 1.3 2023/07/07 19:45:22 rillig Exp $ */ # 3 "stmt_goto.c" /* * Tests for the 'goto' statement. */ +/* lint1-extra-flags: -X 351 */ + /* expect+1: error: syntax error 'goto' [249] */ goto invalid_at_top_level; diff --git a/tests/usr.bin/xlint/xlint/t_xlint.sh b/tests/usr.bin/xlint/xlint/t_xlint.sh index 522d02419cd..65d414b879a 100644 --- a/tests/usr.bin/xlint/xlint/t_xlint.sh +++ b/tests/usr.bin/xlint/xlint/t_xlint.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_xlint.sh,v 1.2 2023/06/28 09:35:43 rillig Exp $ +# $NetBSD: t_xlint.sh,v 1.3 2023/07/07 19:45:22 rillig Exp $ # # Copyright (c) 2023 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,9 +41,14 @@ run_lint1_error_body() EOF echo 'previous content' > input.ln + cat <<-EOF > expected.out + input.c(5): warning: missing header declaration for 'return_true' [351] + input.c(6): error: function has return type '_Bool' but returns 'int' [211] + EOF + atf_check \ -s 'exit:1' \ - -o "inline:input.c(6): error: function has return type '_Bool' but returns 'int' [211]\n" \ + -o 'file:expected.out' \ "$lint" -aabceghiprSTxz input.c # In case of an error, any previous output file is overwritten, and the @@ -73,9 +78,13 @@ run_lint1_warning_body() 2s 4d0.4dr8functionF2IPcCPcV EOF + cat <<-EOF >expected.out + input.c(5): warning: missing header declaration for 'function' [351] + input.c(1): warning: static variable 'number' unused [226] + EOF atf_check \ - -o "inline:input.c(1): warning: static variable 'number' unused [226]\n" \ + -o 'file:expected.out' \ "$lint" -aabceghiprSTxz input.c atf_check \ -o 'file:input.exp' \ -- cgit