Module Name: src Committed By: rillig Date: Fri Apr 9 20:12:01 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.exp d_c99_union_cast.exp d_cvt_constant.exp d_decl_old_style_arguments.exp d_fold_test.exp d_init_pop_member.exp msg_019.exp msg_050.exp msg_051.exp msg_057.exp msg_084.exp msg_096.exp msg_109.exp msg_114.exp msg_126.exp msg_170.exp msg_189.c msg_189.exp msg_191.c msg_191.exp msg_192.c msg_192.exp msg_204.exp msg_231.c msg_231.exp src/usr.bin/xlint/lint1: decl.c err.c Log Message: lint: quote placeholders in messages for unused variables To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp \ src/tests/usr.bin/xlint/lint1/d_fold_test.exp \ src/tests/usr.bin/xlint/lint1/msg_050.exp \ src/tests/usr.bin/xlint/lint1/msg_051.exp \ src/tests/usr.bin/xlint/lint1/msg_096.exp \ src/tests/usr.bin/xlint/lint1/msg_109.exp \ src/tests/usr.bin/xlint/lint1/msg_170.exp \ src/tests/usr.bin/xlint/lint1/msg_189.c \ src/tests/usr.bin/xlint/lint1/msg_189.exp cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp \ src/tests/usr.bin/xlint/lint1/msg_019.exp \ src/tests/usr.bin/xlint/lint1/msg_114.exp \ src/tests/usr.bin/xlint/lint1/msg_126.exp \ src/tests/usr.bin/xlint/lint1/msg_204.exp cvs rdiff -u -r1.2 -r1.3 \ src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp \ src/tests/usr.bin/xlint/lint1/msg_057.exp \ src/tests/usr.bin/xlint/lint1/msg_084.exp \ src/tests/usr.bin/xlint/lint1/msg_191.c \ src/tests/usr.bin/xlint/lint1/msg_191.exp \ src/tests/usr.bin/xlint/lint1/msg_192.c \ src/tests/usr.bin/xlint/lint1/msg_192.exp \ src/tests/usr.bin/xlint/lint1/msg_231.c \ src/tests/usr.bin/xlint/lint1/msg_231.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp cvs rdiff -u -r1.170 -r1.171 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xlint/lint1/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.24 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.25 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.24 Fri Apr 2 22:41:54 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Apr 9 20:12:00 2021 @@ -31,7 +31,7 @@ d_c99_bool_strict.c(253): error: return d_c99_bool_strict.c(259): error: return value type mismatch (_Bool) and (int) [211] d_c99_bool_strict.c(265): error: return value type mismatch (_Bool) and (int) [211] d_c99_bool_strict.c(271): error: return value type mismatch (_Bool) and (pointer) [211] -d_c99_bool_strict.c(269): warning: argument p unused in function strict_bool_conversion_return_pointer [231] +d_c99_bool_strict.c(269): warning: argument 'p' unused in function 'strict_bool_conversion_return_pointer' [231] d_c99_bool_strict.c(277): error: return value type mismatch (char) and (_Bool) [211] d_c99_bool_strict.c(283): error: return value type mismatch (char) and (_Bool) [211] d_c99_bool_strict.c(301): error: argument #2 expects 'int', gets passed '_Bool' [334] @@ -53,7 +53,7 @@ d_c99_bool_strict.c(352): error: operand d_c99_bool_strict.c(353): error: operands of '=' have incompatible types (unsigned int != _Bool) [107] d_c99_bool_strict.c(354): error: operands of '=' have incompatible types (double != _Bool) [107] d_c99_bool_strict.c(355): error: operands of '=' have incompatible types (pointer != _Bool) [107] -d_c99_bool_strict.c(345): warning: argument b unused in function strict_bool_conversion_from_bool_to_scalar [231] +d_c99_bool_strict.c(345): warning: argument 'b' unused in function 'strict_bool_conversion_from_bool_to_scalar' [231] d_c99_bool_strict.c(367): warning: constant in conditional context [161] d_c99_bool_strict.c(368): warning: statement not reached [193] d_c99_bool_strict.c(370): warning: constant in conditional context [161] @@ -159,7 +159,7 @@ d_c99_bool_strict.c(625): error: operand d_c99_bool_strict.c(663): error: operands of '=' have incompatible types (_Bool != int) [107] d_c99_bool_strict.c(671): error: operands of '=' have incompatible types (_Bool != int) [107] d_c99_bool_strict.c(678): error: operands of '=' have incompatible types (_Bool != int) [107] -d_c99_bool_strict.c(653): warning: argument flags unused in function strict_bool_bitwise_and_enum [231] +d_c99_bool_strict.c(653): warning: argument 'flags' unused in function 'strict_bool_bitwise_and_enum' [231] d_c99_bool_strict.c(717): error: operands of '==' have incompatible types (_Bool != int) [107] d_c99_bool_strict.c(729): warning: expression has null effect [129] d_c99_bool_strict.c(741): error: right operand of '+' must not be bool [337] Index: src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp:1.3 src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp:1.4 --- src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp:1.3 Sun Jan 31 14:57:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp Fri Apr 9 20:12:00 2021 @@ -1 +1 @@ -d_c99_union_cast.c(19): warning: a unused in function foo [192] +d_c99_union_cast.c(19): warning: 'a' unused in function 'foo' [192] Index: src/tests/usr.bin/xlint/lint1/d_fold_test.exp diff -u src/tests/usr.bin/xlint/lint1/d_fold_test.exp:1.3 src/tests/usr.bin/xlint/lint1/d_fold_test.exp:1.4 --- src/tests/usr.bin/xlint/lint1/d_fold_test.exp:1.3 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/d_fold_test.exp Fri Apr 9 20:12:00 2021 @@ -1,14 +1,14 @@ d_fold_test.c(59): error: controlling expressions must have scalar type [204] -d_fold_test.c(59): warning: argument s unused in function if_struct [231] +d_fold_test.c(59): warning: argument 's' unused in function 'if_struct' [231] d_fold_test.c(60): error: controlling expressions must have scalar type [204] -d_fold_test.c(60): warning: argument u unused in function if_union [231] +d_fold_test.c(60): warning: argument 'u' unused in function 'if_union' [231] d_fold_test.c(65): error: controlling expressions must have scalar type [204] -d_fold_test.c(65): warning: argument s unused in function while_struct [231] +d_fold_test.c(65): warning: argument 's' unused in function 'while_struct' [231] d_fold_test.c(66): error: controlling expressions must have scalar type [204] d_fold_test.c(66): warning: end-of-loop code not reached [223] -d_fold_test.c(66): warning: argument s unused in function for_struct [231] +d_fold_test.c(66): warning: argument 's' unused in function 'for_struct' [231] d_fold_test.c(67): error: controlling expressions must have scalar type [204] -d_fold_test.c(67): warning: argument s unused in function do_while_struct [231] +d_fold_test.c(67): warning: argument 's' unused in function 'do_while_struct' [231] d_fold_test.c(70): error: first operand must have scalar type, op ? : [170] d_fold_test.c(70): warning: function conditional_struct expects to return value [214] -d_fold_test.c(70): warning: argument s unused in function conditional_struct [231] +d_fold_test.c(70): warning: argument 's' unused in function 'conditional_struct' [231] Index: src/tests/usr.bin/xlint/lint1/msg_050.exp diff -u src/tests/usr.bin/xlint/lint1/msg_050.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_050.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_050.exp:1.3 Sun Mar 28 15:36:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_050.exp Fri Apr 9 20:12:01 2021 @@ -1,2 +1,2 @@ msg_050.c(11): warning: a function is declared as an argument: f [50] -msg_050.c(10): warning: argument f unused in function example [231] +msg_050.c(10): warning: argument 'f' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_051.exp diff -u src/tests/usr.bin/xlint/lint1/msg_051.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_051.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_051.exp:1.3 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_051.exp Fri Apr 9 20:12:01 2021 @@ -1,4 +1,4 @@ msg_051.c(12): error: parameter mismatch: 2 declared, 3 defined [51] -msg_051.c(10): warning: argument a unused in function example [231] -msg_051.c(10): warning: argument b unused in function example [231] -msg_051.c(10): warning: argument c unused in function example [231] +msg_051.c(10): warning: argument 'a' unused in function 'example' [231] +msg_051.c(10): warning: argument 'b' unused in function 'example' [231] +msg_051.c(10): warning: argument 'c' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_096.exp diff -u src/tests/usr.bin/xlint/lint1/msg_096.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_096.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_096.exp:1.3 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_096.exp Fri Apr 9 20:12:01 2021 @@ -1,3 +1,3 @@ msg_096.c(21): error: cannot dereference non-pointer type [96] msg_096.c(21): warning: function unary_asterisk expects to return value [214] -msg_096.c(19): warning: argument i unused in function unary_asterisk [231] +msg_096.c(19): warning: argument 'i' unused in function 'unary_asterisk' [231] Index: src/tests/usr.bin/xlint/lint1/msg_109.exp diff -u src/tests/usr.bin/xlint/lint1/msg_109.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_109.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_109.exp:1.3 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_109.exp Fri Apr 9 20:12:01 2021 @@ -1,3 +1,3 @@ msg_109.c(9): error: void type illegal in expression [109] msg_109.c(9): warning: function example expects to return value [214] -msg_109.c(7): warning: argument arg unused in function example [231] +msg_109.c(7): warning: argument 'arg' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_170.exp diff -u src/tests/usr.bin/xlint/lint1/msg_170.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_170.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_170.exp:1.3 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_170.exp Fri Apr 9 20:12:01 2021 @@ -1,3 +1,3 @@ msg_170.c(13): error: first operand must have scalar type, op ? : [170] msg_170.c(13): warning: function example expects to return value [214] -msg_170.c(11): warning: argument num unused in function example [231] +msg_170.c(11): warning: argument 'num' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_189.c diff -u src/tests/usr.bin/xlint/lint1/msg_189.c:1.3 src/tests/usr.bin/xlint/lint1/msg_189.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_189.c:1.3 Sun Mar 28 15:36:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_189.c Fri Apr 9 20:12:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_189.c,v 1.3 2021/03/28 15:36:37 rillig Exp $ */ +/* $NetBSD: msg_189.c,v 1.4 2021/04/09 20:12:01 rillig Exp $ */ # 3 "msg_189.c" /* Test for message: assignment of struct/union illegal in traditional C [189] */ @@ -16,5 +16,5 @@ example() a.member = 3; b = a; /* message 189 is not triggered anymore */ - /* expect-1: b set but not used in function example */ + /* expect-1: 'b' set but not used in function 'example' */ } Index: src/tests/usr.bin/xlint/lint1/msg_189.exp diff -u src/tests/usr.bin/xlint/lint1/msg_189.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_189.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_189.exp:1.3 Sun Mar 28 15:36:37 2021 +++ src/tests/usr.bin/xlint/lint1/msg_189.exp Fri Apr 9 20:12:01 2021 @@ -1 +1 @@ -msg_189.c(18): warning: b set but not used in function example [191] +msg_189.c(18): warning: 'b' set but not used in function 'example' [191] Index: src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp diff -u src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp:1.4 src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp:1.5 --- src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp:1.4 Sun Feb 21 09:17:55 2021 +++ src/tests/usr.bin/xlint/lint1/d_cvt_constant.exp Fri Apr 9 20:12:00 2021 @@ -1 +1 @@ -d_cvt_constant.c(8): warning: x set but not used in function main [191] +d_cvt_constant.c(8): warning: 'x' set but not used in function 'main' [191] Index: src/tests/usr.bin/xlint/lint1/msg_019.exp diff -u src/tests/usr.bin/xlint/lint1/msg_019.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_019.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_019.exp:1.4 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.exp Fri Apr 9 20:12:01 2021 @@ -2,5 +2,5 @@ msg_019.c(6): error: void type for 'glob msg_019.c(8): error: void type for 'unit_variable' [19] msg_019.c(11): error: void parameter cannot have name: parameter [61] msg_019.c(13): error: void type for 'local_variable' [19] -msg_019.c(11): warning: argument parameter unused in function function [231] +msg_019.c(11): warning: argument 'parameter' unused in function 'function' [231] msg_019.c(8): warning: static variable unit_variable unused [226] Index: src/tests/usr.bin/xlint/lint1/msg_114.exp diff -u src/tests/usr.bin/xlint/lint1/msg_114.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_114.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_114.exp:1.4 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_114.exp Fri Apr 9 20:12:01 2021 @@ -1,4 +1,4 @@ msg_114.c(9): error: operand of 'x++' must be lvalue [114] msg_114.c(17): error: operand of 'x++' has invalid type (array) [108] msg_114.c(19): error: operand of 'x++' must be lvalue [114] -msg_114.c(7): warning: argument a unused in function example [231] +msg_114.c(7): warning: argument 'a' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_126.exp diff -u src/tests/usr.bin/xlint/lint1/msg_126.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_126.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_126.exp:1.4 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_126.exp Fri Apr 9 20:12:01 2021 @@ -1,5 +1,5 @@ msg_126.c(9): error: incompatible types 'pointer to void' and 'double' in conditional [126] msg_126.c(9): warning: function max expects to return value [214] -msg_126.c(7): warning: argument cond unused in function max [231] -msg_126.c(7): warning: argument ptr unused in function max [231] -msg_126.c(7): warning: argument dbl unused in function max [231] +msg_126.c(7): warning: argument 'cond' unused in function 'max' [231] +msg_126.c(7): warning: argument 'ptr' unused in function 'max' [231] +msg_126.c(7): warning: argument 'dbl' unused in function 'max' [231] Index: src/tests/usr.bin/xlint/lint1/msg_204.exp diff -u src/tests/usr.bin/xlint/lint1/msg_204.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_204.exp:1.5 --- src/tests/usr.bin/xlint/lint1/msg_204.exp:1.4 Sun Mar 21 20:45:00 2021 +++ src/tests/usr.bin/xlint/lint1/msg_204.exp Fri Apr 9 20:12:01 2021 @@ -1,14 +1,14 @@ msg_204.c(87): error: controlling expressions must have scalar type [204] -msg_204.c(87): warning: argument s unused in function if_struct [231] +msg_204.c(87): warning: argument 's' unused in function 'if_struct' [231] msg_204.c(88): error: controlling expressions must have scalar type [204] -msg_204.c(88): warning: argument u unused in function if_union [231] +msg_204.c(88): warning: argument 'u' unused in function 'if_union' [231] msg_204.c(93): error: controlling expressions must have scalar type [204] -msg_204.c(93): warning: argument s unused in function while_struct [231] +msg_204.c(93): warning: argument 's' unused in function 'while_struct' [231] msg_204.c(94): error: controlling expressions must have scalar type [204] msg_204.c(94): warning: end-of-loop code not reached [223] -msg_204.c(94): warning: argument s unused in function for_struct [231] +msg_204.c(94): warning: argument 's' unused in function 'for_struct' [231] msg_204.c(95): error: controlling expressions must have scalar type [204] -msg_204.c(95): warning: argument s unused in function do_while_struct [231] +msg_204.c(95): warning: argument 's' unused in function 'do_while_struct' [231] msg_204.c(101): error: first operand must have scalar type, op ? : [170] msg_204.c(101): warning: function conditional_struct expects to return value [214] -msg_204.c(101): warning: argument s unused in function conditional_struct [231] +msg_204.c(101): warning: argument 's' unused in function 'conditional_struct' [231] Index: src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp diff -u src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp:1.2 src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp:1.3 --- src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp:1.2 Sun Mar 21 20:44:59 2021 +++ src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp Fri Apr 9 20:12:00 2021 @@ -1,6 +1,6 @@ d_decl_old_style_arguments.c(14): warning: argument type defaults to 'int': def [32] d_decl_old_style_arguments.c(14): error: parameter mismatch: 3 declared, 4 defined [51] -d_decl_old_style_arguments.c(10): warning: argument num unused in function func [231] -d_decl_old_style_arguments.c(10): warning: argument ptr unused in function func [231] -d_decl_old_style_arguments.c(10): warning: argument dbl unused in function func [231] -d_decl_old_style_arguments.c(10): warning: argument def unused in function func [231] +d_decl_old_style_arguments.c(10): warning: argument 'num' unused in function 'func' [231] +d_decl_old_style_arguments.c(10): warning: argument 'ptr' unused in function 'func' [231] +d_decl_old_style_arguments.c(10): warning: argument 'dbl' unused in function 'func' [231] +d_decl_old_style_arguments.c(10): warning: argument 'def' unused in function 'func' [231] Index: src/tests/usr.bin/xlint/lint1/msg_057.exp diff -u src/tests/usr.bin/xlint/lint1/msg_057.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_057.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_057.exp:1.2 Fri Jan 8 21:25:03 2021 +++ src/tests/usr.bin/xlint/lint1/msg_057.exp Fri Apr 9 20:12:01 2021 @@ -1,6 +1,6 @@ msg_057.c(10): warning: enumeration constant hides parameter: red [57] msg_057.c(10): warning: enumeration constant hides parameter: green [57] msg_057.c(11): warning: enumeration constant hides parameter: blue [57] -msg_057.c(7): warning: argument red unused in function rgb [231] -msg_057.c(7): warning: argument green unused in function rgb [231] -msg_057.c(7): warning: argument blue unused in function rgb [231] +msg_057.c(7): warning: argument 'red' unused in function 'rgb' [231] +msg_057.c(7): warning: argument 'green' unused in function 'rgb' [231] +msg_057.c(7): warning: argument 'blue' unused in function 'rgb' [231] Index: src/tests/usr.bin/xlint/lint1/msg_084.exp diff -u src/tests/usr.bin/xlint/lint1/msg_084.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_084.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_084.exp:1.2 Fri Jan 8 21:25:03 2021 +++ src/tests/usr.bin/xlint/lint1/msg_084.exp Fri Apr 9 20:12:01 2021 @@ -1,2 +1,2 @@ msg_084.c(6): warning: ANSI C requires formal parameter before '...' [84] -msg_084.c(10): warning: argument fmt unused in function ok_ellipsis [231] +msg_084.c(10): warning: argument 'fmt' unused in function 'ok_ellipsis' [231] Index: src/tests/usr.bin/xlint/lint1/msg_191.c diff -u src/tests/usr.bin/xlint/lint1/msg_191.c:1.2 src/tests/usr.bin/xlint/lint1/msg_191.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_191.c:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_191.c Fri Apr 9 20:12:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_191.c,v 1.2 2021/01/30 17:56:29 rillig Exp $ */ +/* $NetBSD: msg_191.c,v 1.3 2021/04/09 20:12:01 rillig Exp $ */ # 3 "msg_191.c" -// Test for message: %s set but not used in function %s [191] +// Test for message: '%s' set but not used in function '%s' [191] void example(void) Index: src/tests/usr.bin/xlint/lint1/msg_191.exp diff -u src/tests/usr.bin/xlint/lint1/msg_191.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_191.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_191.exp:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_191.exp Fri Apr 9 20:12:01 2021 @@ -1 +1 @@ -msg_191.c(11): warning: local set but not used in function example [191] +msg_191.c(11): warning: 'local' set but not used in function 'example' [191] Index: src/tests/usr.bin/xlint/lint1/msg_192.c diff -u src/tests/usr.bin/xlint/lint1/msg_192.c:1.2 src/tests/usr.bin/xlint/lint1/msg_192.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_192.c:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_192.c Fri Apr 9 20:12:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_192.c,v 1.2 2021/01/30 17:56:29 rillig Exp $ */ +/* $NetBSD: msg_192.c,v 1.3 2021/04/09 20:12:01 rillig Exp $ */ # 3 "msg_192.c" -// Test for message: %s unused in function %s [192] +// Test for message: '%s' unused in function '%s' [192] void example(int param) /* expect: 231 */ Index: src/tests/usr.bin/xlint/lint1/msg_192.exp diff -u src/tests/usr.bin/xlint/lint1/msg_192.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_192.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_192.exp:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_192.exp Fri Apr 9 20:12:01 2021 @@ -1,2 +1,2 @@ -msg_192.c(9): warning: local unused in function example [192] -msg_192.c(7): warning: argument param unused in function example [231] +msg_192.c(9): warning: 'local' unused in function 'example' [192] +msg_192.c(7): warning: argument 'param' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/msg_231.c diff -u src/tests/usr.bin/xlint/lint1/msg_231.c:1.2 src/tests/usr.bin/xlint/lint1/msg_231.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_231.c:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_231.c Fri Apr 9 20:12:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_231.c,v 1.2 2021/01/30 17:56:29 rillig Exp $ */ +/* $NetBSD: msg_231.c,v 1.3 2021/04/09 20:12:01 rillig Exp $ */ # 3 "msg_231.c" -// Test for message: argument %s unused in function %s [231] +// Test for message: argument '%s' unused in function '%s' [231] void example(int param) /* expect: 231 */ Index: src/tests/usr.bin/xlint/lint1/msg_231.exp diff -u src/tests/usr.bin/xlint/lint1/msg_231.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_231.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_231.exp:1.2 Sat Jan 30 17:56:29 2021 +++ src/tests/usr.bin/xlint/lint1/msg_231.exp Fri Apr 9 20:12:01 2021 @@ -1,2 +1,2 @@ -msg_231.c(9): warning: local unused in function example [192] -msg_231.c(7): warning: argument param unused in function example [231] +msg_231.c(9): warning: 'local' unused in function 'example' [192] +msg_231.c(7): warning: argument 'param' unused in function 'example' [231] Index: src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp diff -u src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp:1.6 src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp:1.7 --- src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp:1.6 Tue Mar 30 14:25:28 2021 +++ src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp Fri Apr 9 20:12:00 2021 @@ -1 +1 @@ -d_init_pop_member.c(38): warning: st set but not used in function func [191] +d_init_pop_member.c(38): warning: 'st' set but not used in function 'func' [191] Index: src/usr.bin/xlint/lint1/decl.c diff -u src/usr.bin/xlint/lint1/decl.c:1.170 src/usr.bin/xlint/lint1/decl.c:1.171 --- src/usr.bin/xlint/lint1/decl.c:1.170 Fri Apr 2 12:16:50 2021 +++ src/usr.bin/xlint/lint1/decl.c Fri Apr 9 20:12:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.170 2021/04/02 12:16:50 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.171 2021/04/09 20:12:00 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.170 2021/04/02 12:16:50 rillig Exp $"); +__RCSID("$NetBSD: decl.c,v 1.171 2021/04/09 20:12:00 rillig Exp $"); #endif #include <sys/param.h> @@ -3040,7 +3040,7 @@ check_argument_usage(bool novar, sym_t * if (!arg->s_used && vflag) { curr_pos = arg->s_def_pos; - /* argument %s unused in function %s */ + /* argument '%s' unused in function '%s' */ warning(231, arg->s_name, funcsym->s_name); } } @@ -3073,17 +3073,17 @@ check_variable_usage(bool novar, sym_t * if (sc == EXTERN) { if (!sym->s_used && !sym->s_set) { curr_pos = sym->s_def_pos; - /* %s unused in function %s */ + /* '%s' unused in function '%s' */ warning(192, sym->s_name, funcsym->s_name); } } else { if (sym->s_set && !sym->s_used) { curr_pos = sym->s_set_pos; - /* %s set but not used in function %s */ + /* '%s' set but not used in function '%s' */ warning(191, sym->s_name, funcsym->s_name); } else if (!sym->s_used) { curr_pos = sym->s_def_pos; - /* %s unused in function %s */ + /* '%s' unused in function '%s' */ warning(192, sym->s_name, funcsym->s_name); } } Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.105 src/usr.bin/xlint/lint1/err.c:1.106 --- src/usr.bin/xlint/lint1/err.c:1.105 Fri Apr 9 15:58:43 2021 +++ src/usr.bin/xlint/lint1/err.c Fri Apr 9 20:12:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.105 2021/04/09 15:58:43 rillig Exp $ */ +/* $NetBSD: err.c,v 1.106 2021/04/09 20:12:00 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.105 2021/04/09 15:58:43 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.106 2021/04/09 20:12:00 rillig Exp $"); #endif #include <sys/types.h> @@ -245,8 +245,8 @@ const char *msgs[] = { "no automatic aggregate initialization in traditional C", /* 188 */ "", /* no longer used */ /* 189 */ "empty array declaration: %s", /* 190 */ - "%s set but not used in function %s", /* 191 */ - "%s unused in function %s", /* 192 */ + "'%s' set but not used in function '%s'", /* 191 */ + "'%s' unused in function '%s'", /* 192 */ "statement not reached", /* 193 */ "label %s redefined", /* 194 */ "case not in switch", /* 195 */ @@ -285,7 +285,7 @@ const char *msgs[] = { "function cannot return const or volatile object", /* 228 */ "converting '%s' to '%s' is questionable", /* 229 */ "nonportable character comparison, op %s", /* 230 */ - "argument %s unused in function %s", /* 231 */ + "argument '%s' unused in function '%s'", /* 231 */ "label %s unused in function %s", /* 232 */ "struct %s never defined", /* 233 */ "union %s never defined", /* 234 */