From 4a29af3e7e781de02b66d044b90aebd888ee3694 Mon Sep 17 00:00:00 2001 From: rillig Date: Sun, 9 Jul 2023 10:42:07 +0000 Subject: [PATCH] lint: remove redundant '#' after 'argument' in diagnostics --- tests/usr.bin/xlint/lint1/d_c99_bool_strict.c | 22 ++++---- .../xlint/lint1/d_c99_bool_strict_syshdr.c | 6 +-- tests/usr.bin/xlint/lint1/d_constant_conv2.c | 4 +- tests/usr.bin/xlint/lint1/d_type_conv1.c | 4 +- tests/usr.bin/xlint/lint1/d_type_conv2.c | 4 +- tests/usr.bin/xlint/lint1/d_type_conv3.c | 4 +- tests/usr.bin/xlint/lint1/msg_259.c | 50 +++++++++---------- tests/usr.bin/xlint/lint1/msg_259_c90.c | 22 ++++---- tests/usr.bin/xlint/lint1/msg_259_ilp32.c | 4 +- tests/usr.bin/xlint/lint1/msg_330.c | 6 +-- tests/usr.bin/xlint/lint1/msg_331.c | 6 +-- tests/usr.bin/xlint/lint1/msg_332.c | 6 +-- tests/usr.bin/xlint/lint1/msg_334.c | 8 +-- tests/usr.bin/xlint/lint1/msg_336.c | 4 +- tests/usr.bin/xlint/lint1/msg_337.c | 4 +- tests/usr.bin/xlint/lint1/platform_int.c | 4 +- usr.bin/xlint/lint1/ckbool.c | 6 +-- usr.bin/xlint/lint1/err.c | 8 +-- usr.bin/xlint/lint1/tree.c | 6 +-- 19 files changed, 89 insertions(+), 89 deletions(-) diff --git a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c index 837fb39cd8b9..e6ee0111bdc3 100644 --- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c +++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c @@ -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_pass(bool b, int i, const char *p) 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_pass(bool b, int i, const char *p) 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); } diff --git a/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c b/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c index f4b566976f91..2eb33d1827d4 100644 --- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c +++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c @@ -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) diff --git a/tests/usr.bin/xlint/lint1/d_constant_conv2.c b/tests/usr.bin/xlint/lint1/d_constant_conv2.c index 8accf8b5ac20..cbcbc1fcd8a0 100644 --- a/tests/usr.bin/xlint/lint1/d_constant_conv2.c +++ b/tests/usr.bin/xlint/lint1/d_constant_conv2.c @@ -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); } diff --git a/tests/usr.bin/xlint/lint1/d_type_conv1.c b/tests/usr.bin/xlint/lint1/d_type_conv1.c index 020f45c3d831..94b3b00a3ceb 100644 --- a/tests/usr.bin/xlint/lint1/d_type_conv1.c +++ b/tests/usr.bin/xlint/lint1/d_type_conv1.c @@ -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); } diff --git a/tests/usr.bin/xlint/lint1/d_type_conv2.c b/tests/usr.bin/xlint/lint1/d_type_conv2.c index cf0a76aa70f9..5ed647fbd43a 100644 --- a/tests/usr.bin/xlint/lint1/d_type_conv2.c +++ b/tests/usr.bin/xlint/lint1/d_type_conv2.c @@ -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); } diff --git a/tests/usr.bin/xlint/lint1/d_type_conv3.c b/tests/usr.bin/xlint/lint1/d_type_conv3.c index 251ed1f0a44b..5fb5b39748f7 100644 --- a/tests/usr.bin/xlint/lint1/d_type_conv3.c +++ b/tests/usr.bin/xlint/lint1/d_type_conv3.c @@ -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); } diff --git a/tests/usr.bin/xlint/lint1/msg_259.c b/tests/usr.bin/xlint/lint1/msg_259.c index 4f7faf0f117e..f7361c069034 100644 --- a/tests/usr.bin/xlint/lint1/msg_259.c +++ b/tests/usr.bin/xlint/lint1/msg_259.c @@ -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 sc, unsigned char uc, 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 long sll) */ 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 long sll) */ 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)); } diff --git a/tests/usr.bin/xlint/lint1/msg_259_c90.c b/tests/usr.bin/xlint/lint1/msg_259_c90.c index e45afd663ce2..05c0c0d198bd 100644 --- a/tests/usr.bin/xlint/lint1/msg_259_c90.c +++ b/tests/usr.bin/xlint/lint1/msg_259_c90.c @@ -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 sc, unsigned char uc, 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)); } diff --git a/tests/usr.bin/xlint/lint1/msg_259_ilp32.c b/tests/usr.bin/xlint/lint1/msg_259_ilp32.c index d35f40870791..5a2b22b467fe 100644 --- a/tests/usr.bin/xlint/lint1/msg_259_ilp32.c +++ b/tests/usr.bin/xlint/lint1/msg_259_ilp32.c @@ -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. diff --git a/tests/usr.bin/xlint/lint1/msg_330.c b/tests/usr.bin/xlint/lint1/msg_330.c index 618974482a39..dcd9f61ca009 100644 --- a/tests/usr.bin/xlint/lint1/msg_330.c +++ b/tests/usr.bin/xlint/lint1/msg_330.c @@ -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); } diff --git a/tests/usr.bin/xlint/lint1/msg_331.c b/tests/usr.bin/xlint/lint1/msg_331.c index bd21007585b7..28c2c238fb1a 100644 --- a/tests/usr.bin/xlint/lint1/msg_331.c +++ b/tests/usr.bin/xlint/lint1/msg_331.c @@ -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'); diff --git a/tests/usr.bin/xlint/lint1/msg_332.c b/tests/usr.bin/xlint/lint1/msg_332.c index 908936a8ce3d..b3d8de21f8fe 100644 --- a/tests/usr.bin/xlint/lint1/msg_332.c +++ b/tests/usr.bin/xlint/lint1/msg_332.c @@ -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'); diff --git a/tests/usr.bin/xlint/lint1/msg_334.c b/tests/usr.bin/xlint/lint1/msg_334.c index d77551b61c33..96f8d569c3a4 100644 --- a/tests/usr.bin/xlint/lint1/msg_334.c +++ b/tests/usr.bin/xlint/lint1/msg_334.c @@ -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); diff --git a/tests/usr.bin/xlint/lint1/msg_336.c b/tests/usr.bin/xlint/lint1/msg_336.c index 31f2504b5795..03472d28608e 100644 --- a/tests/usr.bin/xlint/lint1/msg_336.c +++ b/tests/usr.bin/xlint/lint1/msg_336.c @@ -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); diff --git a/tests/usr.bin/xlint/lint1/msg_337.c b/tests/usr.bin/xlint/lint1/msg_337.c index 2e2cb78a53d9..28674eaf6a3f 100644 --- a/tests/usr.bin/xlint/lint1/msg_337.c +++ b/tests/usr.bin/xlint/lint1/msg_337.c @@ -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); diff --git a/tests/usr.bin/xlint/lint1/platform_int.c b/tests/usr.bin/xlint/lint1/platform_int.c index e354442ec582..c2f8ca48e5ed 100644 --- a/tests/usr.bin/xlint/lint1/platform_int.c +++ b/tests/usr.bin/xlint/lint1/platform_int.c @@ -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 char uc) * 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); } diff --git a/usr.bin/xlint/lint1/ckbool.c b/usr.bin/xlint/lint1/ckbool.c index d3fe3f21fb5e..1d6e197df892 100644 --- a/usr.bin/xlint/lint1/ckbool.c +++ b/usr.bin/xlint/lint1/ckbool.c @@ -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 #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 @@ -120,7 +120,7 @@ typeok_strict_bool_binary_compatible(op_t op, int arg, 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' */ diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c index 4a009cee293b..93fa712ce393 100644 --- a/usr.bin/xlint/lint1/err.c +++ b/usr.bin/xlint/lint1/err.c @@ -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 #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 @@ -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 */ diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index d6109cdc165b..728079cd033e 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -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 #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 @@ -3380,7 +3380,7 @@ check_prototype_conversion(int arg, tspec_t nt, tspec_t ot, type_t *tp, 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)); } }