Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: add quotes around placeholders for...
details: https://anonhg.NetBSD.org/src/rev/eb0ba40b6e68
branches: trunk
changeset: 367690:eb0ba40b6e68
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Jun 22 19:23:17 2022 +0000
description:
lint: add quotes around placeholders for the remaining messages
Reword some of the messages slightly, exchanging brevity for clarity.
Message 138 is kept as-is, as it is not yet covered by any tests.
Message 240 is kep as-is, as it is unreachable.
diffstat:
tests/usr.bin/xlint/lint1/c11_generic_expression.c | 4 +-
tests/usr.bin/xlint/lint1/d_alignof.c | 6 +-
tests/usr.bin/xlint/lint1/d_c99_bool_strict.c | 18 ++--
tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c | 4 +-
tests/usr.bin/xlint/lint1/d_c99_complex_split.c | 6 +-
tests/usr.bin/xlint/lint1/d_c99_init.c | 8 +-
tests/usr.bin/xlint/lint1/d_init_array_using_string.c | 6 +-
tests/usr.bin/xlint/lint1/d_return_type.c | 4 +-
tests/usr.bin/xlint/lint1/decl.c | 6 +-
tests/usr.bin/xlint/lint1/emit.c | 6 +-
tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c | 4 +-
tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.c | 4 +-
tests/usr.bin/xlint/lint1/init.c | 4 +-
tests/usr.bin/xlint/lint1/init_braces.c | 10 +-
tests/usr.bin/xlint/lint1/lex_integer_ilp32.c | 4 +-
tests/usr.bin/xlint/lint1/msg_016.c | 4 +-
tests/usr.bin/xlint/lint1/msg_017.c | 6 +-
tests/usr.bin/xlint/lint1/msg_018.c | 4 +-
tests/usr.bin/xlint/lint1/msg_065.c | 6 +-
tests/usr.bin/xlint/lint1/msg_091.c | 4 +-
tests/usr.bin/xlint/lint1/msg_113.c | 6 +-
tests/usr.bin/xlint/lint1/msg_128.c | 6 +-
tests/usr.bin/xlint/lint1/msg_137.c | 7 +-
tests/usr.bin/xlint/lint1/msg_142.c | 8 +-
tests/usr.bin/xlint/lint1/msg_149.c | 6 +-
tests/usr.bin/xlint/lint1/msg_150.c | 6 +-
tests/usr.bin/xlint/lint1/msg_154.c | 6 +-
tests/usr.bin/xlint/lint1/msg_156.c | 8 +-
tests/usr.bin/xlint/lint1/msg_158.c | 6 +-
tests/usr.bin/xlint/lint1/msg_162.c | 34 ++++----
tests/usr.bin/xlint/lint1/msg_182.c | 8 +-
tests/usr.bin/xlint/lint1/msg_183.c | 8 +-
tests/usr.bin/xlint/lint1/msg_190.c | 6 +-
tests/usr.bin/xlint/lint1/msg_194.c | 6 +-
tests/usr.bin/xlint/lint1/msg_211.c | 8 +-
tests/usr.bin/xlint/lint1/msg_213.c | 6 +-
tests/usr.bin/xlint/lint1/msg_215.c | 6 +-
tests/usr.bin/xlint/lint1/msg_216.c | 6 +-
tests/usr.bin/xlint/lint1/msg_217.c | 8 +-
tests/usr.bin/xlint/lint1/msg_218.c | 19 +++-
tests/usr.bin/xlint/lint1/msg_222.c | 4 +-
tests/usr.bin/xlint/lint1/msg_225.c | 6 +-
tests/usr.bin/xlint/lint1/msg_227.c | 6 +-
tests/usr.bin/xlint/lint1/msg_230_uchar.c | 4 +-
tests/usr.bin/xlint/lint1/msg_241.c | 70 ++++++++--------
tests/usr.bin/xlint/lint1/msg_242.c | 12 +-
tests/usr.bin/xlint/lint1/msg_243.c | 12 +-
tests/usr.bin/xlint/lint1/msg_246.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_261.c | 4 +-
tests/usr.bin/xlint/lint1/msg_276.c | 8 +-
tests/usr.bin/xlint/lint1/msg_280.c | 14 +-
tests/usr.bin/xlint/lint1/msg_281.c | 6 +-
tests/usr.bin/xlint/lint1/msg_282.c | 12 +-
tests/usr.bin/xlint/lint1/msg_283.c | 6 +-
tests/usr.bin/xlint/lint1/msg_290.c | 8 +-
tests/usr.bin/xlint/lint1/msg_302.c | 10 +-
tests/usr.bin/xlint/lint1/msg_306.c | 6 +-
tests/usr.bin/xlint/lint1/msg_324.c | 18 ++--
tests/usr.bin/xlint/lint1/msg_326.c | 6 +-
tests/usr.bin/xlint/lint1/msg_346.c | 6 +-
usr.bin/xlint/lint1/ckbool.c | 6 +-
usr.bin/xlint/lint1/decl.c | 32 +++---
usr.bin/xlint/lint1/err.c | 74 +++++++++---------
usr.bin/xlint/lint1/func.c | 40 ++++----
usr.bin/xlint/lint1/init.c | 6 +-
usr.bin/xlint/lint1/tree.c | 73 +++++++++--------
68 files changed, 381 insertions(+), 372 deletions(-)
diffs (truncated from 2437 to 300 lines):
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/c11_generic_expression.c
--- a/tests/usr.bin/xlint/lint1/c11_generic_expression.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/c11_generic_expression.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c11_generic_expression.c,v 1.12 2022/06/17 18:54:53 rillig Exp $ */
+/* $NetBSD: c11_generic_expression.c,v 1.13 2022/06/22 19:23:18 rillig Exp $ */
# 3 "c11_generic_expression.c"
/*
@@ -74,7 +74,7 @@
char: "first",
double: 2.0
);
- /* expect+1: warning: function comma_expression falls off bottom without returning value [217] */
+ /* expect+1: warning: function 'comma_expression' falls off bottom without returning value [217] */
}
/*
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_alignof.c
--- a/tests/usr.bin/xlint/lint1/d_alignof.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_alignof.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_alignof.c,v 1.7 2022/05/12 20:57:49 rillig Exp $ */
+/* $NetBSD: d_alignof.c,v 1.8 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_alignof.c"
/* https://gcc.gnu.org/onlinedocs/gcc/Alignment.html */
@@ -23,7 +23,7 @@
/* expect+1: error: syntax error 'short' [249] */
return alignof(short);
}
-/* expect-1: warning: function plain_alignof_type falls off bottom without returning value [217] */
+/* expect-1: warning: function 'plain_alignof_type' falls off bottom without returning value [217] */
unsigned long
leading_and_trailing_alignof_expr(void)
@@ -45,7 +45,7 @@
/* expect+1: error: syntax error '3' [249] */
return alignof 3;
}
-/* expect-1: warning: function plain_alignof_expr falls off bottom without returning value [217] */
+/* expect-1: warning: function 'plain_alignof_expr' falls off bottom without returning value [217] */
/*
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_c99_bool_strict.c,v 1.38 2022/06/19 12:14:34 rillig Exp $ */
+/* $NetBSD: d_c99_bool_strict.c,v 1.39 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_c99_bool_strict.c"
/*
@@ -279,21 +279,21 @@
bool
strict_bool_conversion_return_0(void)
{
- /* expect+1: error: return value type mismatch (_Bool) and (int) [211] */
+ /* expect+1: error: function has return type '_Bool' but returns 'int' [211] */
return 0;
}
bool
strict_bool_conversion_return_1(void)
{
- /* expect+1: error: return value type mismatch (_Bool) and (int) [211] */
+ /* expect+1: error: function has return type '_Bool' but returns 'int' [211] */
return 1;
}
bool
strict_bool_conversion_return_2(void)
{
- /* expect+1: error: return value type mismatch (_Bool) and (int) [211] */
+ /* expect+1: error: function has return type '_Bool' but returns 'int' [211] */
return 2;
}
@@ -301,21 +301,21 @@
bool
strict_bool_conversion_return_pointer(const void *p)
{
- /* expect+1: error: return value type mismatch (_Bool) and (pointer) [211] */
+ /* expect+1: error: function has return type '_Bool' but returns 'pointer' [211] */
return p;
}
char
strict_bool_conversion_return_false_as_char(void)
{
- /* expect+1: error: return value type mismatch (char) and (_Bool) [211] */
+ /* expect+1: error: function has return type 'char' but returns '_Bool' [211] */
return __lint_false;
}
char
strict_bool_conversion_return_true_as_char(void)
{
- /* expect+1: error: return value type mismatch (char) and (_Bool) [211] */
+ /* expect+1: error: function has return type 'char' but returns '_Bool' [211] */
return __lint_true;
}
@@ -340,12 +340,12 @@
/* Implicitly converting int to bool (arg #1). */
/* 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] */
+ /* 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+1: warning: illegal combination of integer (int) and pointer (pointer to const char), arg #2 [154] */
+ /* expect+1: warning: illegal combination of integer 'int' and pointer 'pointer to const char', arg #2 [154] */
take_arguments(p, p, p);
/* Passing bool as vararg. */
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.17 2022/06/19 12:14:34 rillig Exp $ */
+/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.18 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_c99_bool_strict_syshdr.c"
/*
@@ -153,7 +153,7 @@
_Bool
call_finite_bad(double d)
{
- /* expect+1: error: return value type mismatch (_Bool) and (int) [211] */
+ /* expect+1: error: function has return type '_Bool' but returns 'int' [211] */
return finite(d);
}
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_c99_complex_split.c
--- a/tests/usr.bin/xlint/lint1/d_c99_complex_split.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_complex_split.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_c99_complex_split.c,v 1.10 2022/06/19 12:14:34 rillig Exp $ */
+/* $NetBSD: d_c99_complex_split.c,v 1.11 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_c99_complex_split.c"
/*
@@ -42,7 +42,7 @@
/*
* Before tree.c 1.275 from 2021-04-09, lint wrongly warned that when
- * '__real__ c' was assigned, 'c may be used before set'.
+ * '__real__ c' was assigned, 'c may be used before set [158]'.
*
* As of 2021-04-09, support for _Complex is still very incomplete, see
* build_real_imag for details.
@@ -59,7 +59,7 @@
/*
* Before tree.c 1.275 from 2021-04-09, lint wrongly warned that when
- * '__imag__ c' was assigned, 'c may be used before set'.
+ * '__imag__ c' was assigned, 'c may be used before set [158]'.
*
* As of 2021-04-09, support for _Complex is still very incomplete, see
* build_real_imag for details.
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_c99_init.c
--- a/tests/usr.bin/xlint/lint1/d_c99_init.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_init.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_c99_init.c,v 1.41 2022/06/17 18:54:53 rillig Exp $ */
+/* $NetBSD: d_c99_init.c,v 1.42 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_c99_init.c"
/*
@@ -241,7 +241,7 @@
char prefixed_message[] = {
'E', ':', ' ',
- /* expect+1: warning: illegal combination of integer (char) and pointer (pointer to char) [183] */
+ /* expect+1: warning: illegal combination of integer 'char' and pointer 'pointer to char' [183] */
"message\n",
};
@@ -458,7 +458,7 @@
struct {
int:16;
- /* expect+2: warning: structure has no named members [65] */
+ /* expect+2: warning: 'struct <unnamed>' has no named members [65] */
/* expect+1: error: cannot initialize struct/union with no named member [179] */
} struct_with_only_unnamed_members = {
123,
@@ -466,7 +466,7 @@
union {
int:16;
- /* expect+2: warning: union has no named members [65] */
+ /* expect+2: warning: 'union <unnamed>' has no named members [65] */
/* expect+1: error: cannot initialize struct/union with no named member [179] */
} union_with_only_unnamed_members = {
123,
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_init_array_using_string.c
--- a/tests/usr.bin/xlint/lint1/d_init_array_using_string.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_init_array_using_string.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_init_array_using_string.c,v 1.11 2022/06/17 18:54:53 rillig Exp $ */
+/* $NetBSD: d_init_array_using_string.c,v 1.12 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_init_array_using_string.c"
/*
@@ -60,9 +60,9 @@
};
struct cs_ws type_mismatch = {
- /* expect+1: warning: illegal combination of integer (char) and pointer (pointer to int) [183] */
+ /* expect+1: warning: illegal combination of integer 'char' and pointer 'pointer to int' [183] */
L"",
- /* expect+1: warning: illegal combination of integer (char) and pointer (pointer to char) [183] */
+ /* expect+1: warning: illegal combination of integer 'char' and pointer 'pointer to char' [183] */
"",
};
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/d_return_type.c
--- a/tests/usr.bin/xlint/lint1/d_return_type.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_return_type.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_return_type.c,v 1.4 2022/01/15 14:22:03 rillig Exp $ */
+/* $NetBSD: d_return_type.c,v 1.5 2022/06/22 19:23:18 rillig Exp $ */
# 3 "d_return_type.c"
enum A {
@@ -12,6 +12,6 @@
enum A
func(enum B arg)
{
- /* expect+1: warning: return value type mismatch (enum A) and (enum B) [211] */
+ /* expect+1: warning: function has return type 'enum A' but returns 'enum B' [211] */
return arg;
}
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/decl.c
--- a/tests/usr.bin/xlint/lint1/decl.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/decl.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.17 2022/06/17 18:54:53 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.18 2022/06/22 19:23:18 rillig Exp $ */
# 3 "decl.c"
/*
@@ -66,7 +66,7 @@
/* expect+1: warning: converting 'pointer to char' to incompatible 'pointer to double' for argument 1 [153] */
sink(pc);
- /* expect+1: warning: illegal combination of pointer (pointer to double) and integer (char), arg #1 [154] */
+ /* expect+1: warning: illegal combination of pointer 'pointer to double' and integer 'char', arg #1 [154] */
sink(c);
/* expect+1: warning: converting 'pointer to pointer to char' to incompatible 'pointer to double' for argument 1 [153] */
sink(ppc);
@@ -179,5 +179,5 @@
* "elsz > 0" in 'length'.
*/
/* expect+2: error: syntax error 'goto' [249] */
-/* expect+1: warning: empty array declaration: void_array_error [190] */
+/* expect+1: warning: empty array declaration for 'void_array_error' [190] */
void void_array_error[] goto;
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/emit.c
--- a/tests/usr.bin/xlint/lint1/emit.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/emit.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emit.c,v 1.12 2022/06/11 11:52:13 rillig Exp $ */
+/* $NetBSD: emit.c,v 1.13 2022/06/22 19:23:18 rillig Exp $ */
# 3 "emit.c"
/*
@@ -125,7 +125,7 @@
/* For function declarations, the keyword 'extern' is optional. */
extern void extern_return_void_no_parameters(void);
/* implicit extern */ void return_void_no_parameters(void);
-/* expect+1: warning: static function static_return_void_no_parameters declared but not defined [290] */
+/* expect+1: warning: static function 'static_return_void_no_parameters' declared but not defined [290] */
static void static_return_void_no_parameters(void);
void taking_int(int);
@@ -145,7 +145,7 @@
* is nevertheless recorded. There's probably a good reason for recording
* it.
*/
-/* expect+1: warning: static function static_function declared but not defined [290] */
+/* expect+1: warning: static function 'static_function' declared but not defined [290] */
static int static_function(void);
void my_printf(const char *, ...);
diff -r c5992a2aeda1 -r eb0ba40b6e68 tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c
--- a/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c Wed Jun 22 19:18:17 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/gcc_builtin_alloca.c Wed Jun 22 19:23:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gcc_builtin_alloca.c,v 1.2 2021/12/06 23:26:28 rillig Exp $ */
+/* $NetBSD: gcc_builtin_alloca.c,v 1.3 2022/06/22 19:23:18 rillig Exp $ */
# 3 "gcc_builtin_alloca.c"
/*
@@ -17,7 +17,7 @@
Home |
Main Index |
Thread Index |
Old Index