Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint2 lint: warn about extern declarations out...



details:   https://anonhg.NetBSD.org/src/rev/967afbb46208
branches:  trunk
changeset: 374045:967afbb46208
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Mar 28 14:44:34 2023 +0000

description:
lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html

diffstat:

 distrib/sets/lists/tests/mi                            |   3 +-
 lib/libppath/Makefile                                  |   3 +-
 lib/libpuffs/Makefile                                  |   3 +-
 lib/libutil/Makefile                                   |   3 +-
 tests/usr.bin/xlint/lint1/c11_generic_expression.c     |   4 +-
 tests/usr.bin/xlint/lint1/c90.c                        |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_anon_union.c           |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_bool.c                 |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c   |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_complex_num.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_complex_split.c        |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c    |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_for_loops.c            |   5 +-
 tests/usr.bin/xlint/lint1/d_c99_func.c                 |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_init.c                 |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_nested_struct.c        |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_struct_init.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_union_init1.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_union_init2.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_union_init3.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_union_init4.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c99_union_init5.c          |   4 +-
 tests/usr.bin/xlint/lint1/d_c9x_array_init.c           |   4 +-
 tests/usr.bin/xlint/lint1/d_cast_lhs.c                 |   5 +-
 tests/usr.bin/xlint/lint1/d_cast_typeof.c              |   4 +-
 tests/usr.bin/xlint/lint1/d_compound_literals2.c       |   4 +-
 tests/usr.bin/xlint/lint1/d_constant_conv1.c           |   4 +-
 tests/usr.bin/xlint/lint1/d_constant_conv2.c           |   3 +-
 tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.c |   2 +
 tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c |   4 +-
 tests/usr.bin/xlint/lint1/d_gcc_extension.c            |   4 +-
 tests/usr.bin/xlint/lint1/d_init_array_using_string.c  |   4 +-
 tests/usr.bin/xlint/lint1/d_lint_assert.c              |   4 +-
 tests/usr.bin/xlint/lint1/d_nested_structs.c           |   4 +-
 tests/usr.bin/xlint/lint1/d_packed_structs.c           |   4 +-
 tests/usr.bin/xlint/lint1/d_struct_init_nested.c       |   4 +-
 tests/usr.bin/xlint/lint1/d_type_conv1.c               |   3 +-
 tests/usr.bin/xlint/lint1/d_type_conv2.c               |   3 +-
 tests/usr.bin/xlint/lint1/d_type_conv3.c               |   3 +-
 tests/usr.bin/xlint/lint1/d_typefun.c                  |   4 +-
 tests/usr.bin/xlint/lint1/decl.c                       |   4 +-
 tests/usr.bin/xlint/lint1/decl_arg.c                   |   4 +-
 tests/usr.bin/xlint/lint1/decl_direct_abstract.c       |   4 +-
 tests/usr.bin/xlint/lint1/decl_struct_member.c         |   4 +-
 tests/usr.bin/xlint/lint1/emit.c                       |   6 +-
 tests/usr.bin/xlint/lint1/emit_lp64.c                  |   4 +-
 tests/usr.bin/xlint/lint1/expr_binary.c                |   3 +-
 tests/usr.bin/xlint/lint1/expr_binary_trad.c           |   4 +-
 tests/usr.bin/xlint/lint1/expr_fold.c                  |   4 +-
 tests/usr.bin/xlint/lint1/expr_precedence.c            |   4 +-
 tests/usr.bin/xlint/lint1/expr_promote.c               |   4 +-
 tests/usr.bin/xlint/lint1/expr_promote_trad.c          |   4 +-
 tests/usr.bin/xlint/lint1/expr_range.c                 |   4 +-
 tests/usr.bin/xlint/lint1/expr_sizeof.c                |   4 +-
 tests/usr.bin/xlint/lint1/gcc_attribute.c              |   4 +-
 tests/usr.bin/xlint/lint1/gcc_attribute_func.c         |   4 +-
 tests/usr.bin/xlint/lint1/gcc_attribute_label.c        |   4 +-
 tests/usr.bin/xlint/lint1/gcc_attribute_stmt.c         |   4 +-
 tests/usr.bin/xlint/lint1/gcc_attribute_var.c          |   4 +-
 tests/usr.bin/xlint/lint1/gcc_bit_field_types.c        |   4 +-
 tests/usr.bin/xlint/lint1/gcc_init_compound_literal.c  |   4 +-
 tests/usr.bin/xlint/lint1/gcc_typeof.c                 |   4 +-
 tests/usr.bin/xlint/lint1/init.c                       |   4 +-
 tests/usr.bin/xlint/lint1/init_c90.c                   |   4 +-
 tests/usr.bin/xlint/lint1/lex_char.c                   |   4 +-
 tests/usr.bin/xlint/lint1/lex_char_uchar.c             |   3 +-
 tests/usr.bin/xlint/lint1/lex_floating.c               |   4 +-
 tests/usr.bin/xlint/lint1/lex_integer.c                |   3 +-
 tests/usr.bin/xlint/lint1/lex_integer_binary.c         |   4 +-
 tests/usr.bin/xlint/lint1/lex_integer_ilp32.c          |   3 +-
 tests/usr.bin/xlint/lint1/lex_string.c                 |   4 +-
 tests/usr.bin/xlint/lint1/lex_wide_char.c              |   4 +-
 tests/usr.bin/xlint/lint1/lex_wide_string.c            |   4 +-
 tests/usr.bin/xlint/lint1/msg_000.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_001.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_001_c90.c                |   4 +-
 tests/usr.bin/xlint/lint1/msg_002.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_004.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_006.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_007.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_009.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_010.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_013.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_014.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_015.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_016.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_017.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_018.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_019.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_020.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_022.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_024.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_026.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_027.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_029.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_031.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_038.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_040.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_044.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_046.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_049.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_051.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_058.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_060.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_061.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_067.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_068.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_069.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_070.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_071.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_073.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_074.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_075.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_076.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_077.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_078.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_079.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_080.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_081.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_082.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_083.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_085.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_086.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_087.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_088.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_090.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_095.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_101.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_112.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_115.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_123.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_124.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_129.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_130.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_131.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_132.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_132_ilp32.c              |   4 +-
 tests/usr.bin/xlint/lint1/msg_135.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_139.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_141.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_142.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_147.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_150.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_151.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_152.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_153.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_154.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_155.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_156.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_157.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_158.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_160.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_161.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_162.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_168.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_169.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_172.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_173.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_175.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_176.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_177.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_178.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_179.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_180.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_181.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_185.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_186.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_187.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_188.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_190.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_193.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_204.c                    |   6 +-
 tests/usr.bin/xlint/lint1/msg_210.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_212.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_218.c                    |   3 +-
 tests/usr.bin/xlint/lint1/msg_219.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_220.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_221.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_222.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_238.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_241.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_242.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_243.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_245.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_247.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_248.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_249.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_251.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_252.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_255.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_256.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_257.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_258.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_259.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_259_c90.c                |   4 +-
 tests/usr.bin/xlint/lint1/msg_259_ilp32.c              |   4 +-
 tests/usr.bin/xlint/lint1/msg_262.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_263.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_264.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_265.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_266.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_269.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_270.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_276.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_277.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_278.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_279.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_282.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_284.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_285.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_291.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_292.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_294.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_296.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_297.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_298.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_301.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_303.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_304.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_305.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_308.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_313.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_315.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_316.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_319.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_321.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_323.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_325.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_326.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_327.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_330.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_331.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_332.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_334.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_336.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_337.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_338.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_339.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_341.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_342.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_343.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_346.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_347.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_348.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_349.c                    |   4 +-
 tests/usr.bin/xlint/lint1/msg_351.c                    |  37 +++++++++++++++++
 tests/usr.bin/xlint/lint1/op_colon.c                   |   4 +-
 tests/usr.bin/xlint/lint1/op_shl_lp64.c                |   3 +-
 tests/usr.bin/xlint/lint1/parse_init_declarator.c      |   4 +-
 tests/usr.bin/xlint/lint1/parse_stmt_error.c           |   4 +-
 tests/usr.bin/xlint/lint1/parse_stmt_iter_error.c      |   4 +-
 tests/usr.bin/xlint/lint1/parse_type_name.c            |   4 +-
 tests/usr.bin/xlint/lint1/platform_ilp32_int.c         |   4 +-
 tests/usr.bin/xlint/lint1/platform_ilp32_long.c        |   4 +-
 tests/usr.bin/xlint/lint1/platform_int.c               |   4 +-
 tests/usr.bin/xlint/lint1/platform_long.c              |   4 +-
 tests/usr.bin/xlint/lint1/platform_lp64.c              |   4 +-
 tests/usr.bin/xlint/lint1/queries.c                    |   4 +-
 tests/usr.bin/xlint/lint1/stmt_if.c                    |   4 +-
 usr.bin/xlint/lint1/Makefile                           |   9 ++-
 usr.bin/xlint/lint1/decl.c                             |  38 +++++++++++++----
 usr.bin/xlint/lint1/err.c                              |   5 +-
 usr.bin/xlint/lint1/externs1.h                         |   8 ++-
 usr.bin/xlint/lint1/func.c                             |   6 +-
 usr.bin/xlint/lint1/tree.c                             |   7 +--
 usr.bin/xlint/lint2/main2.c                            |   6 +-
 267 files changed, 764 insertions(+), 378 deletions(-)

diffs (truncated from 4364 to 300 lines):

diff -r b6bf57b66714 -r 967afbb46208 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Tue Mar 28 14:39:31 2023 +0000
+++ b/distrib/sets/lists/tests/mi       Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1254 2023/02/27 23:07:53 rillig Exp $
+# $NetBSD: mi,v 1.1255 2023/03/28 14:44:34 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7341,6 +7341,7 @@
 ./usr/tests/usr.bin/xlint/lint1/msg_349.c                      tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_349.exp                    tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/msg_350.c                      tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/msg_351.c                      tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.c                     tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/op_colon.exp                   tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c                  tests-usr.bin-tests     compattestfile,atf
diff -r b6bf57b66714 -r 967afbb46208 lib/libppath/Makefile
--- a/lib/libppath/Makefile     Tue Mar 28 14:39:31 2023 +0000
+++ b/lib/libppath/Makefile     Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2013/09/11 23:04:11 joerg Exp $
+#      $NetBSD: Makefile,v 1.4 2023/03/28 14:44:34 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -17,6 +17,7 @@ SRCS+=ppath_malloc.c
 LIBDPLIBS+=    prop            ${NETBSDSRCDIR}/lib/libprop
 
 LINTFLAGS+=-w
+LINTFLAGS.ppath_extant.c+=     -X 351  # 'extern' declaration outside header
 LIB=   ppath
 
 MAN+=          ppath.3
diff -r b6bf57b66714 -r 967afbb46208 lib/libpuffs/Makefile
--- a/lib/libpuffs/Makefile     Tue Mar 28 14:39:31 2023 +0000
+++ b/lib/libpuffs/Makefile     Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.27 2022/01/22 07:35:26 pho Exp $
+#      $NetBSD: Makefile,v 1.28 2023/03/28 14:44:34 rillig Exp $
 #
 
 .include <bsd.own.mk>
@@ -17,5 +17,6 @@ MAN=          puffs.3 puffs_cc.3 puffs_cred.3 pu
 INCS=          puffs.h puffsdump.h
 INCSDIR=       /usr/include
 LINTFLAGS+=-S -w
+LINTFLAGS+=    -X 351          # extern declaration outside header
 
 .include <bsd.lib.mk>
diff -r b6bf57b66714 -r 967afbb46208 lib/libutil/Makefile
--- a/lib/libutil/Makefile      Tue Mar 28 14:39:31 2023 +0000
+++ b/lib/libutil/Makefile      Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.85 2019/10/13 07:28:11 mrg Exp $
+#      $NetBSD: Makefile,v 1.86 2023/03/28 14:44:34 rillig Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/4/93
 
 USE_SHLIBDIR=  yes
@@ -38,6 +38,7 @@ MAN=  efun.3 \
 CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_UTIL_H
 CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NETATALK_AT_H
 CPPFLAGS.sockaddr_snprintf.c+=-DHAVE_NET_IF_DL_H
+LINTFLAGS.if_media.c+= -X 351  # 'extern' declaration outside header
 
 COPTS.logwtmp.c+=      ${GCC_NO_STRINGOP_TRUNCATION}
 COPTS.logwtmpx.c+=     ${GCC_NO_STRINGOP_TRUNCATION}
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/c11_generic_expression.c
--- a/tests/usr.bin/xlint/lint1/c11_generic_expression.c        Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c11_generic_expression.c        Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c11_generic_expression.c,v 1.14 2023/01/04 05:32:01 rillig Exp $       */
+/*     $NetBSD: c11_generic_expression.c,v 1.15 2023/03/28 14:44:34 rillig Exp $       */
 # 3 "c11_generic_expression.c"
 
 /*
@@ -11,7 +11,7 @@
  * C11 6.5.1.1 "Generic selection"
  */
 
-/* lint1-extra-flags: -Ac11 */
+/* lint1-extra-flags: -Ac11 -X 351 */
 
 /*
  * The type of 'var' is not compatible with any of the types from the
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/c90.c
--- a/tests/usr.bin/xlint/lint1/c90.c   Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/c90.c   Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c90.c,v 1.1 2021/07/25 22:03:42 rillig Exp $   */
+/*     $NetBSD: c90.c,v 1.2 2023/03/28 14:44:34 rillig Exp $   */
 # 3 "c90.c"
 
 /*
@@ -6,7 +6,7 @@
  * later C standards nor GNU extensions.
  */
 
-/* lint1-flags: -sw */
+/* lint1-flags: -sw -X 351 */
 
 /* expect+1: error: ANSI C requires formal parameter before '...' [84] */
 void varargs_function(...);
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_anon_union.c
--- a/tests/usr.bin/xlint/lint1/d_c99_anon_union.c      Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_anon_union.c      Tue Mar 28 14:44:34 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_c99_anon_union.c,v 1.4 2021/02/20 22:31:20 rillig Exp $      */
+/*     $NetBSD: d_c99_anon_union.c,v 1.5 2023/03/28 14:44:34 rillig Exp $      */
 # 3 "d_c99_anon_union.c"
 
 /* struct with only anonymous members */
 
+/* lint1-extra-flags: -X 351 */
+
 struct foo {
        union {
                long loo;
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_bool.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool.c    Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool.c    Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_bool.c,v 1.9 2022/01/16 08:40:31 rillig Exp $    */
+/*     $NetBSD: d_c99_bool.c,v 1.10 2023/03/28 14:44:34 rillig Exp $   */
 # 3 "d_c99_bool.c"
 
 /*
@@ -9,6 +9,8 @@
  * invoke undefined behavior.
  */
 
+/* lint1-extra-flags: -X 351 */
+
 /* Below, each false statement produces "negative array dimension" [20]. */
 
 int int_0_converts_to_false[(_Bool)0 ? -1 : 1];
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_bool_strict.c,v 1.39 2022/06/22 19:23:18 rillig Exp $    */
+/*     $NetBSD: d_c99_bool_strict.c,v 1.40 2023/03/28 14:44:34 rillig Exp $    */
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -98,7 +98,7 @@
  * __lint_false and true to __lint_true, two predefined constant expressions.
  */
 
-/* lint1-extra-flags: -hT */
+/* lint1-extra-flags: -hT -X 351 */
 
 /*
  * strict-bool-typedef
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c      Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c      Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_bool_strict_syshdr.c,v 1.18 2022/06/22 19:23:18 rillig Exp $     */
+/*     $NetBSD: d_c99_bool_strict_syshdr.c,v 1.19 2023/03/28 14:44:34 rillig Exp $     */
 # 3 "d_c99_bool_strict_syshdr.c"
 
 /*
@@ -11,7 +11,7 @@
  * and functions from system headers may use int expressions as well.
  */
 
-/* lint1-extra-flags: -T */
+/* lint1-extra-flags: -T -X 351 */
 
 extern const unsigned short *ctype_table;
 
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_complex_num.c
--- a/tests/usr.bin/xlint/lint1/d_c99_complex_num.c     Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_complex_num.c     Tue Mar 28 14:44:34 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_c99_complex_num.c,v 1.2 2021/01/31 14:39:31 rillig Exp $     */
+/*     $NetBSD: d_c99_complex_num.c,v 1.3 2023/03/28 14:44:34 rillig Exp $     */
 # 3 "d_c99_complex_num.c"
 
+/* lint1-extra-flags: -X 351 */
+
 double cabs(double _Complex);
 
 double cabs(double _Complex foo)
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_complex_split.c
--- a/tests/usr.bin/xlint/lint1/d_c99_complex_split.c   Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_complex_split.c   Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_complex_split.c,v 1.12 2023/02/05 10:57:48 rillig Exp $  */
+/*     $NetBSD: d_c99_complex_split.c,v 1.13 2023/03/28 14:44:34 rillig Exp $  */
 # 3 "d_c99_complex_split.c"
 
 /*
@@ -6,6 +6,8 @@
  * accessed (since C99).
  */
 
+/* lint1-extra-flags: -X 351 */
+
 int
 b(double a)
 {
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c
--- a/tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c       Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_flex_array_packed.c       Tue Mar 28 14:44:34 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_c99_flex_array_packed.c,v 1.2 2021/01/31 14:39:31 rillig Exp $       */
+/*     $NetBSD: d_c99_flex_array_packed.c,v 1.3 2023/03/28 14:44:34 rillig Exp $       */
 # 3 "d_c99_flex_array_packed.c"
 
+/* lint1-extra-flags: -X 351 */
+
 /* Allow packed c99 flexible arrays */
 struct {
        int x;
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_for_loops.c
--- a/tests/usr.bin/xlint/lint1/d_c99_for_loops.c       Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_for_loops.c       Tue Mar 28 14:44:34 2023 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: d_c99_for_loops.c,v 1.3 2021/01/31 14:39:31 rillig Exp $       */
+/*     $NetBSD: d_c99_for_loops.c,v 1.4 2023/03/28 14:44:34 rillig Exp $       */
 # 3 "d_c99_for_loops.c"
 
-/* c99 for loops */
+/* lint1-extra-flags: -X 351 */
+
 extern void foo(int);
 
 int
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_func.c
--- a/tests/usr.bin/xlint/lint1/d_c99_func.c    Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_func.c    Tue Mar 28 14:44:34 2023 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: d_c99_func.c,v 1.5 2023/01/29 18:16:48 rillig Exp $    */
+/*     $NetBSD: d_c99_func.c,v 1.6 2023/03/28 14:44:34 rillig Exp $    */
 # 3 "d_c99_func.c"
 
 /* C99 __func__ */
 
+/* lint1-extra-flags: -X 351 */
+
 const char *str;
 
 const char *
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_init.c
--- a/tests/usr.bin/xlint/lint1/d_c99_init.c    Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_init.c    Tue Mar 28 14:44:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_init.c,v 1.44 2023/02/05 13:01:28 rillig Exp $   */
+/*     $NetBSD: d_c99_init.c,v 1.45 2023/03/28 14:44:34 rillig Exp $   */
 # 3 "d_c99_init.c"
 
 /*
@@ -7,6 +7,8 @@
  * See C99 6.7.8 "Initialization".
 */
 
+/* lint1-extra-flags: -X 351 */
+
 
 void use(const void *);
 
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_nested_struct.c
--- a/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c   Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_nested_struct.c   Tue Mar 28 14:44:34 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_c99_nested_struct.c,v 1.4 2021/02/20 22:31:20 rillig Exp $   */
+/*     $NetBSD: d_c99_nested_struct.c,v 1.5 2023/03/28 14:44:34 rillig Exp $   */
 # 3 "d_c99_nested_struct.c"
 
+/* lint1-extra-flags: -X 351 */
+
 /* C99 nested struct init with named and non-named initializers */
 typedef struct pthread_mutex_t {
        unsigned int ptm_magic;
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_struct_init.c
--- a/tests/usr.bin/xlint/lint1/d_c99_struct_init.c     Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_struct_init.c     Tue Mar 28 14:44:34 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_c99_struct_init.c,v 1.4 2021/02/20 22:31:20 rillig Exp $     */
+/*     $NetBSD: d_c99_struct_init.c,v 1.5 2023/03/28 14:44:34 rillig Exp $     */
 # 3 "d_c99_struct_init.c"
 
+/* lint1-extra-flags: -X 351 */
+
 /* C99 struct initialization */
 struct {
        int i;
diff -r b6bf57b66714 -r 967afbb46208 tests/usr.bin/xlint/lint1/d_c99_union_init1.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_init1.c     Tue Mar 28 14:39:31 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init1.c     Tue Mar 28 14:44:34 2023 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_c99_union_init1.c,v 1.4 2021/02/20 22:31:20 rillig Exp $     */
+/*     $NetBSD: d_c99_union_init1.c,v 1.5 2023/03/28 14:44:34 rillig Exp $     */
 # 3 "d_c99_union_init1.c"
 
+/* lint1-extra-flags: -X 351 */
+
 /* GCC-style and C99-style union initialization */



Home | Main Index | Thread Index | Old Index