Module Name: src Committed By: rillig Date: Sun Jul 9 10:42:07 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict_syshdr.c d_constant_conv2.c d_type_conv1.c d_type_conv2.c d_type_conv3.c msg_259.c msg_259_c90.c msg_259_ilp32.c msg_330.c msg_331.c msg_332.c msg_334.c msg_336.c msg_337.c platform_int.c src/usr.bin/xlint/lint1: ckbool.c err.c tree.c Log Message: lint: remove redundant '#' after 'argument' in diagnostics To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.19 -r1.20 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_constant_conv2.c \ src/tests/usr.bin/xlint/lint1/d_type_conv1.c \ src/tests/usr.bin/xlint/lint1/d_type_conv2.c \ src/tests/usr.bin/xlint/lint1/msg_330.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_type_conv3.c cvs rdiff -u -r1.22 -r1.23 src/tests/usr.bin/xlint/lint1/msg_259.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_259_c90.c \ src/tests/usr.bin/xlint/lint1/msg_331.c \ src/tests/usr.bin/xlint/lint1/msg_332.c \ src/tests/usr.bin/xlint/lint1/msg_336.c \ src/tests/usr.bin/xlint/lint1/msg_337.c \ src/tests/usr.bin/xlint/lint1/platform_int.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_334.c cvs rdiff -u -r1.23 -r1.24 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.205 -r1.206 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.554 -r1.555 src/usr.bin/xlint/lint1/tree.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.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.41 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.42 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.41 Mon Jul 3 09:37:14 2023 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.41 2023/07/03 09:37:14 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.42 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -124,11 +124,11 @@ strict_bool_constant(void) { accept_bool(__lint_false); accept_bool(__lint_true); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ accept_bool(0); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ accept_bool(1); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ accept_bool(2); } @@ -334,17 +334,17 @@ strict_bool_conversion_function_argument take_arguments(b, i, p); /* Implicitly converting bool to other scalar types. */ - /* expect+2: error: argument #2 expects 'int', gets passed '_Bool' [334] */ - /* expect+1: error: argument #3 expects 'pointer', gets passed '_Bool' [334] */ + /* expect+2: error: argument 2 expects 'int', gets passed '_Bool' [334] */ + /* expect+1: error: argument 3 expects 'pointer', gets passed '_Bool' [334] */ take_arguments(b, b, b); /* Implicitly converting int to bool (arg #1). */ - /* expect+2: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+2: error: argument 1 expects '_Bool', gets passed 'int' [334] */ /* expect+1: warning: illegal combination of pointer 'pointer to const char' and integer 'int', arg #3 [154] */ take_arguments(i, i, i); /* Implicitly converting pointer to bool (arg #1). */ - /* expect+2: error: argument #1 expects '_Bool', gets passed 'pointer' [334] */ + /* expect+2: error: argument 1 expects '_Bool', gets passed 'pointer' [334] */ /* expect+1: warning: illegal combination of integer 'int' and pointer 'pointer to const char', arg #2 [154] */ take_arguments(p, p, p); @@ -359,11 +359,11 @@ strict_bool_conversion_function_argument take_arguments(__lint_true, i, p); /* Trying to pass integer constants. */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ take_arguments(0, i, p); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ take_arguments(1, i, p); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ take_arguments(2, i, p); } Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.19 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.20 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c:1.19 Tue Mar 28 14:44:34 2023 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.19 2023/03/28 14:44:34 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.20 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_c99_bool_strict_syshdr.c" /* @@ -221,7 +221,7 @@ void pass_bool_to_function(void) { - /* expect+5: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+5: error: argument 1 expects '_Bool', gets passed 'int' [334] */ take_bool( # 227 "d_c99_bool_strict_syshdr.c" 3 4 (/*CONSTCOND*/1) @@ -234,7 +234,7 @@ pass_bool_to_function(void) # 235 "d_c99_bool_strict_syshdr.c" ); - /* expect+5: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+5: error: argument 1 expects '_Bool', gets passed 'int' [334] */ take_bool( # 240 "d_c99_bool_strict_syshdr.c" 3 4 (/*CONSTCOND*/0) Index: src/tests/usr.bin/xlint/lint1/d_constant_conv2.c diff -u src/tests/usr.bin/xlint/lint1/d_constant_conv2.c:1.6 src/tests/usr.bin/xlint/lint1/d_constant_conv2.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_constant_conv2.c:1.6 Tue Mar 28 14:44:34 2023 +++ src/tests/usr.bin/xlint/lint1/d_constant_conv2.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_constant_conv2.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */ +/* $NetBSD: d_constant_conv2.c,v 1.7 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_constant_conv2.c" /* Flag information-losing constant conversion in argument lists */ @@ -16,6 +16,6 @@ int f(unsigned int); void should_fail(void) { - /* expect+1: warning: argument #1 is converted from 'double' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'double' to 'unsigned int' due to prototype [259] */ f(2.1); } Index: src/tests/usr.bin/xlint/lint1/d_type_conv1.c diff -u src/tests/usr.bin/xlint/lint1/d_type_conv1.c:1.6 src/tests/usr.bin/xlint/lint1/d_type_conv1.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_type_conv1.c:1.6 Tue Mar 28 14:44:34 2023 +++ src/tests/usr.bin/xlint/lint1/d_type_conv1.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_type_conv1.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */ +/* $NetBSD: d_type_conv1.c,v 1.7 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_type_conv1.c" /* Flag information-losing type conversion in argument lists */ @@ -18,6 +18,6 @@ should_fail(void) { long long x = 20; - /* expect+1: warning: argument #1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ f(x); } Index: src/tests/usr.bin/xlint/lint1/d_type_conv2.c diff -u src/tests/usr.bin/xlint/lint1/d_type_conv2.c:1.6 src/tests/usr.bin/xlint/lint1/d_type_conv2.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_type_conv2.c:1.6 Tue Mar 28 14:44:34 2023 +++ src/tests/usr.bin/xlint/lint1/d_type_conv2.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_type_conv2.c,v 1.6 2023/03/28 14:44:34 rillig Exp $ */ +/* $NetBSD: d_type_conv2.c,v 1.7 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_type_conv2.c" /* Flag information-losing type conversion in argument lists */ @@ -18,6 +18,6 @@ should_fail(void) { double x = 2.0; - /* expect+1: warning: argument #1 is converted from 'double' to 'float' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'double' to 'float' due to prototype [259] */ f(x); } Index: src/tests/usr.bin/xlint/lint1/msg_330.c diff -u src/tests/usr.bin/xlint/lint1/msg_330.c:1.6 src/tests/usr.bin/xlint/lint1/msg_330.c:1.7 --- src/tests/usr.bin/xlint/lint1/msg_330.c:1.6 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_330.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_330.c,v 1.6 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_330.c,v 1.7 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_330.c" // Test for message: operand of '%s' must be bool, not '%s' [330] @@ -19,10 +19,10 @@ example(bool b, char c, int i) called(!b); /* expect+2: error: operand of '!' must be bool, not 'char' [330] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ called(!c); /* expect+2: error: operand of '!' must be bool, not 'int' [330] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ called(!i); } Index: src/tests/usr.bin/xlint/lint1/d_type_conv3.c diff -u src/tests/usr.bin/xlint/lint1/d_type_conv3.c:1.7 src/tests/usr.bin/xlint/lint1/d_type_conv3.c:1.8 --- src/tests/usr.bin/xlint/lint1/d_type_conv3.c:1.7 Tue Mar 28 14:44:34 2023 +++ src/tests/usr.bin/xlint/lint1/d_type_conv3.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: d_type_conv3.c,v 1.7 2023/03/28 14:44:34 rillig Exp $ */ +/* $NetBSD: d_type_conv3.c,v 1.8 2023/07/09 10:42:07 rillig Exp $ */ # 3 "d_type_conv3.c" /* Flag information-losing type conversion in argument lists */ @@ -17,7 +17,7 @@ void should_fail(void) { - /* expect+2: warning: argument #1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ + /* expect+2: warning: argument 1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ /* expect+1: warning: conversion of 'long long' to 'unsigned int' is out of range, arg #1 [295] */ f(0x7fffffffffffffffLL); } Index: src/tests/usr.bin/xlint/lint1/msg_259.c diff -u src/tests/usr.bin/xlint/lint1/msg_259.c:1.22 src/tests/usr.bin/xlint/lint1/msg_259.c:1.23 --- src/tests/usr.bin/xlint/lint1/msg_259.c:1.22 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_259.c Sun Jul 9 10:42:07 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_259.c,v 1.22 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_259.c,v 1.23 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_259.c" -// Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259] +// Test for message: argument %d is converted from '%s' to '%s' due to prototype [259] /* * This warning detects function calls that are translated in very different @@ -136,13 +136,13 @@ small_integer_types(char c, signed char void signed_to_unsigned(int si, long sl, long long sll) { - /* expect+1: warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'int' to 'unsigned int' due to prototype [259] */ unsigned_int(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'unsigned int' due to prototype [259] */ unsigned_int(sl); - /* expect+1: warning: argument #1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'unsigned int' due to prototype [259] */ unsigned_int(sll); /* @@ -152,9 +152,9 @@ signed_to_unsigned(int si, long sl, long */ unsigned_long(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'unsigned long' due to prototype [259] */ unsigned_long(sl); - /* expect+1: warning: argument #1 is converted from 'long long' to 'unsigned long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'unsigned long' due to prototype [259] */ unsigned_long(sll); /* @@ -165,31 +165,31 @@ signed_to_unsigned(int si, long sl, long */ unsigned_long_long(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'unsigned long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'unsigned long long' due to prototype [259] */ unsigned_long_long(sl); - /* expect+1: warning: argument #1 is converted from 'long long' to 'unsigned long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'unsigned long long' due to prototype [259] */ unsigned_long_long(sll); } void unsigned_to_signed(unsigned int ui, unsigned long ul, unsigned long long ull) { - /* expect+1: warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned int' to 'int' due to prototype [259] */ signed_int(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'int' due to prototype [259] */ signed_int(ul); - /* expect+1: warning: argument #1 is converted from 'unsigned long long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long long' to 'int' due to prototype [259] */ signed_int(ull); signed_long(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'long' due to prototype [259] */ signed_long(ul); - /* expect+1: warning: argument #1 is converted from 'unsigned long long' to 'long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long long' to 'long' due to prototype [259] */ signed_long(ull); signed_long_long(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'long long' due to prototype [259] */ signed_long_long(ul); - /* expect+1: warning: argument #1 is converted from 'unsigned long long' to 'long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long long' to 'long long' due to prototype [259] */ signed_long_long(ull); } @@ -197,16 +197,16 @@ void signed_to_signed(signed int si, signed long sl, signed long long sll) { signed_int(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'int' due to prototype [259] */ signed_int(sl); - /* expect+1: warning: argument #1 is converted from 'long long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'int' due to prototype [259] */ signed_int(sll); signed_long(si); signed_long(sl); - /* expect+1: warning: argument #1 is converted from 'long long' to 'long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long long' to 'long' due to prototype [259] */ signed_long(sll); signed_long_long(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'long long' due to prototype [259] */ signed_long_long(sl); signed_long_long(sll); } @@ -215,16 +215,16 @@ void unsigned_to_unsigned(unsigned int ui, unsigned long ul, unsigned long long ull) { unsigned_int(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ unsigned_int(ul); - /* expect+1: warning: argument #1 is converted from 'unsigned long long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long long' to 'unsigned int' due to prototype [259] */ unsigned_int(ull); unsigned_long(ui); unsigned_long(ul); - /* expect+1: warning: argument #1 is converted from 'unsigned long long' to 'unsigned long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long long' to 'unsigned long' due to prototype [259] */ unsigned_long(ull); unsigned_long_long(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'unsigned long long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'unsigned long long' due to prototype [259] */ unsigned_long_long(ul); unsigned_long_long(ull); } @@ -244,6 +244,6 @@ pass_sizeof_as_smaller_type(void) * constant, even though its value would fit in an unsigned int, is * still passed as size_t. */ - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ unsigned_int(sizeof(int)); } Index: src/tests/usr.bin/xlint/lint1/msg_259_c90.c diff -u src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.5 src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.6 --- src/tests/usr.bin/xlint/lint1/msg_259_c90.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_259_c90.c Sun Jul 9 10:42:07 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_259_c90.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_259_c90.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_259_c90.c" -/* Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259] */ +/* Test for message: argument %d is converted from '%s' to '%s' due to prototype [259] */ /* * This warning detects function calls that are translated in very different @@ -135,10 +135,10 @@ small_integer_types(char c, signed char void signed_to_unsigned(int si, long sl) { - /* expect+1: warning: argument #1 is converted from 'int' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'int' to 'unsigned int' due to prototype [259] */ unsigned_int(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'unsigned int' due to prototype [259] */ unsigned_int(sl); /* @@ -148,19 +148,19 @@ signed_to_unsigned(int si, long sl) */ unsigned_long(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'unsigned long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'unsigned long' due to prototype [259] */ unsigned_long(sl); } void unsigned_to_signed(unsigned int ui, unsigned long ul) { - /* expect+1: warning: argument #1 is converted from 'unsigned int' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned int' to 'int' due to prototype [259] */ signed_int(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'int' due to prototype [259] */ signed_int(ul); signed_long(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'long' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'long' due to prototype [259] */ signed_long(ul); } @@ -168,7 +168,7 @@ void signed_to_signed(signed int si, signed long sl) { signed_int(si); - /* expect+1: warning: argument #1 is converted from 'long' to 'int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'long' to 'int' due to prototype [259] */ signed_int(sl); signed_long(si); signed_long(sl); @@ -178,7 +178,7 @@ void unsigned_to_unsigned(unsigned int ui, unsigned long ul) { unsigned_int(ui); - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ unsigned_int(ul); unsigned_long(ui); unsigned_long(ul); @@ -199,6 +199,6 @@ pass_sizeof_as_smaller_type(void) * constant, even though its value would fit in an unsigned int, is * still passed as size_t. */ - /* expect+1: warning: argument #1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned long' to 'unsigned int' due to prototype [259] */ unsigned_int(sizeof(int)); } Index: src/tests/usr.bin/xlint/lint1/msg_331.c diff -u src/tests/usr.bin/xlint/lint1/msg_331.c:1.5 src/tests/usr.bin/xlint/lint1/msg_331.c:1.6 --- src/tests/usr.bin/xlint/lint1/msg_331.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_331.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_331.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_331.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_331.c" // Test for message: left operand of '%s' must be bool, not '%s' [331] @@ -18,11 +18,11 @@ example(bool b, char c, int i) test(b && b); /* expect+2: error: left operand of '&&' must be bool, not 'char' [331] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(c && b); /* expect+2: error: left operand of '&&' must be bool, not 'int' [331] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(i && b); test(c != '\0'); Index: src/tests/usr.bin/xlint/lint1/msg_332.c diff -u src/tests/usr.bin/xlint/lint1/msg_332.c:1.5 src/tests/usr.bin/xlint/lint1/msg_332.c:1.6 --- src/tests/usr.bin/xlint/lint1/msg_332.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_332.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_332.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_332.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_332.c" // Test for message: right operand of '%s' must be bool, not '%s' [332] @@ -18,11 +18,11 @@ example(bool b, char c, int i) test(b && b); /* expect+2: error: right operand of '&&' must be bool, not 'char' [332] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(b && c); /* expect+2: error: right operand of '&&' must be bool, not 'int' [332] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(b && i); test(c != '\0'); Index: src/tests/usr.bin/xlint/lint1/msg_336.c diff -u src/tests/usr.bin/xlint/lint1/msg_336.c:1.5 src/tests/usr.bin/xlint/lint1/msg_336.c:1.6 --- src/tests/usr.bin/xlint/lint1/msg_336.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_336.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_336.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_336.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_336.c" // Test for message: left operand of '%s' must not be bool [336] @@ -16,7 +16,7 @@ void example(bool b, int i) { /* expect+2: error: left operand of '+' must not be bool [336] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(b + i); test(b); Index: src/tests/usr.bin/xlint/lint1/msg_337.c diff -u src/tests/usr.bin/xlint/lint1/msg_337.c:1.5 src/tests/usr.bin/xlint/lint1/msg_337.c:1.6 --- src/tests/usr.bin/xlint/lint1/msg_337.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_337.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_337.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_337.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_337.c" // Test for message: right operand of '%s' must not be bool [337] @@ -16,7 +16,7 @@ void example(bool b, int i) { /* expect+2: error: right operand of '+' must not be bool [337] */ - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test(i + b); test(b); Index: src/tests/usr.bin/xlint/lint1/platform_int.c diff -u src/tests/usr.bin/xlint/lint1/platform_int.c:1.5 src/tests/usr.bin/xlint/lint1/platform_int.c:1.6 --- src/tests/usr.bin/xlint/lint1/platform_int.c:1.5 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/platform_int.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: platform_int.c,v 1.5 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: platform_int.c,v 1.6 2023/07/09 10:42:07 rillig Exp $ */ # 3 "platform_int.c" /* @@ -21,6 +21,6 @@ convert_unsigned_char_to_size(unsigned c * and UINT is the same, 32, but the signedness changes, therefore * the warning. */ - /* expect+1: warning: argument #1 is converted from 'unsigned char' to 'unsigned int' due to prototype [259] */ + /* expect+1: warning: argument 1 is converted from 'unsigned char' to 'unsigned int' due to prototype [259] */ to_size(uc); } Index: src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c diff -u src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.9 src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.10 --- src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c:1.9 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_259_ilp32.c Sun Jul 9 10:42:07 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_259_ilp32.c,v 1.9 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_259_ilp32.c,v 1.10 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_259_ilp32.c" -/* Test for message: argument #%d is converted from '%s' to '%s' due to prototype [259] */ +/* Test for message: argument %d is converted from '%s' to '%s' due to prototype [259] */ /* * See also msg_259, which contains more examples for this warning. Index: src/tests/usr.bin/xlint/lint1/msg_334.c diff -u src/tests/usr.bin/xlint/lint1/msg_334.c:1.3 src/tests/usr.bin/xlint/lint1/msg_334.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_334.c:1.3 Tue Mar 28 14:44:35 2023 +++ src/tests/usr.bin/xlint/lint1/msg_334.c Sun Jul 9 10:42:07 2023 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_334.c,v 1.3 2023/03/28 14:44:35 rillig Exp $ */ +/* $NetBSD: msg_334.c,v 1.4 2023/07/09 10:42:07 rillig Exp $ */ # 3 "msg_334.c" -// Test for message: argument #%d expects '%s', gets passed '%s' [334] +// Test for message: argument %d expects '%s', gets passed '%s' [334] // // See d_c99_bool_strict.c for many more examples. @@ -19,10 +19,10 @@ caller(bool b, int i) { test_bool(b); - /* expect+1: error: argument #1 expects '_Bool', gets passed 'int' [334] */ + /* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */ test_bool(i); - /* expect+1: error: argument #1 expects 'int', gets passed '_Bool' [334] */ + /* expect+1: error: argument 1 expects 'int', gets passed '_Bool' [334] */ test_int(b); test_int(i); Index: src/usr.bin/xlint/lint1/ckbool.c diff -u src/usr.bin/xlint/lint1/ckbool.c:1.23 src/usr.bin/xlint/lint1/ckbool.c:1.24 --- src/usr.bin/xlint/lint1/ckbool.c:1.23 Sun Jul 2 18:14:44 2023 +++ src/usr.bin/xlint/lint1/ckbool.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ckbool.c,v 1.23 2023/07/02 18:14:44 rillig Exp $ */ +/* $NetBSD: ckbool.c,v 1.24 2023/07/09 10:42:07 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: ckbool.c,v 1.23 2023/07/02 18:14:44 rillig Exp $"); +__RCSID("$NetBSD: ckbool.c,v 1.24 2023/07/09 10:42:07 rillig Exp $"); #endif #include <string.h> @@ -120,7 +120,7 @@ typeok_strict_bool_binary_compatible(op_ return true; if (op == FARG) { - /* argument #%d expects '%s', gets passed '%s' */ + /* argument %d expects '%s', gets passed '%s' */ error(334, arg, tspec_name(lt), tspec_name(rt)); } else if (op == RETURN) { /* function has return type '%s' but returns '%s' */ Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.205 src/usr.bin/xlint/lint1/err.c:1.206 --- src/usr.bin/xlint/lint1/err.c:1.205 Fri Jul 7 06:03:31 2023 +++ src/usr.bin/xlint/lint1/err.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.205 2023/07/07 06:03:31 rillig Exp $ */ +/* $NetBSD: err.c,v 1.206 2023/07/09 10:42:07 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: err.c,v 1.205 2023/07/07 06:03:31 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.206 2023/07/09 10:42:07 rillig Exp $"); #endif #include <limits.h> @@ -314,7 +314,7 @@ static const char *const msgs[] = { "unterminated comment", /* 256 */ "extra characters in lint comment", /* 257 */ "unterminated string constant", /* 258 */ - "argument #%d is converted from '%s' to '%s' due to prototype", /* 259 */ + "argument %d is converted from '%s' to '%s' due to prototype", /* 259 */ "previous declaration of '%s'", /* 260 */ "previous definition of '%s'", /* 261 */ "\\\" inside character constants undefined in traditional C", /* 262 */ @@ -389,7 +389,7 @@ static const char *const msgs[] = { "left operand of '%s' must be bool, not '%s'", /* 331 */ "right operand of '%s' must be bool, not '%s'", /* 332 */ "controlling expression must be bool, not '%s'", /* 333 */ - "argument #%d expects '%s', gets passed '%s'", /* 334 */ + "argument %d expects '%s', gets passed '%s'", /* 334 */ "operand of '%s' must not be bool", /* 335 */ "left operand of '%s' must not be bool", /* 336 */ "right operand of '%s' must not be bool", /* 337 */ Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.554 src/usr.bin/xlint/lint1/tree.c:1.555 --- src/usr.bin/xlint/lint1/tree.c:1.554 Sat Jul 8 16:13:00 2023 +++ src/usr.bin/xlint/lint1/tree.c Sun Jul 9 10:42:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.554 2023/07/08 16:13:00 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.555 2023/07/09 10:42:07 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: tree.c,v 1.554 2023/07/08 16:13:00 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.555 2023/07/09 10:42:07 rillig Exp $"); #endif #include <float.h> @@ -3380,7 +3380,7 @@ check_prototype_conversion(int arg, tspe ot = ptn->tn_type->t_tspec; if (should_warn_about_prototype_conversion(nt, ot, ptn)) { - /* argument #%d is converted from '%s' to '%s' ... */ + /* argument %d is converted from '%s' to '%s' ... */ warning(259, arg, type_name(tn->tn_type), type_name(tp)); } }