Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src tests/lint: add more details to messages in msg_200 until ms...
details: https://anonhg.NetBSD.org/src/rev/b1db1fd9dba2
branches: trunk
changeset: 366809:b1db1fd9dba2
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Jun 16 21:24:41 2022 +0000
description:
tests/lint: add more details to messages in msg_200 until msg_299
Add some tests that were previously empty. Some other tests are still
empty.
diffstat:
distrib/sets/lists/tests/mi | 4 +-
tests/usr.bin/xlint/check-expect.lua | 4 +-
tests/usr.bin/xlint/lint1/Makefile | 3 +-
tests/usr.bin/xlint/lint1/msg_202.c | 17 +++++-
tests/usr.bin/xlint/lint1/msg_202.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_204.c | 25 ++++++--
tests/usr.bin/xlint/lint1/msg_204.exp | 20 ++----
tests/usr.bin/xlint/lint1/msg_205.c | 12 +++-
tests/usr.bin/xlint/lint1/msg_205.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_207.c | 5 +-
tests/usr.bin/xlint/lint1/msg_207.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_208.c | 5 +-
tests/usr.bin/xlint/lint1/msg_208.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_209.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_209.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_210.c | 8 +-
tests/usr.bin/xlint/lint1/msg_210.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_212.c | 6 +-
tests/usr.bin/xlint/lint1/msg_212.exp | 1 -
tests/usr.bin/xlint/lint1/msg_213.c | 11 ++-
tests/usr.bin/xlint/lint1/msg_213.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_216.c | 5 +-
tests/usr.bin/xlint/lint1/msg_217.c | 11 ++-
tests/usr.bin/xlint/lint1/msg_217.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_218.c | 5 +-
tests/usr.bin/xlint/lint1/msg_218.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_220.c | 8 +-
tests/usr.bin/xlint/lint1/msg_220.exp | 10 +-
tests/usr.bin/xlint/lint1/msg_221.c | 5 +-
tests/usr.bin/xlint/lint1/msg_221.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_223.c | 5 +-
tests/usr.bin/xlint/lint1/msg_223.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_224.c | 18 ++++--
tests/usr.bin/xlint/lint1/msg_224.exp | 8 +-
tests/usr.bin/xlint/lint1/msg_225.c | 5 +-
tests/usr.bin/xlint/lint1/msg_225.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_227.c | 9 ++-
tests/usr.bin/xlint/lint1/msg_227.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_228.c | 22 ++++++-
tests/usr.bin/xlint/lint1/msg_228.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_229.c | 8 +-
tests/usr.bin/xlint/lint1/msg_229.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_231.c | 8 +-
tests/usr.bin/xlint/lint1/msg_231.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_238.c | 5 +-
tests/usr.bin/xlint/lint1/msg_238.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_239.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_239.exp | 8 +-
tests/usr.bin/xlint/lint1/msg_240.c | 46 +++++++++++++++-
tests/usr.bin/xlint/lint1/msg_240.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_241.c | 95 +++++++++++++++++++++++-----------
tests/usr.bin/xlint/lint1/msg_241.exp | 66 ++++++++++++------------
tests/usr.bin/xlint/lint1/msg_243.c | 14 +++-
tests/usr.bin/xlint/lint1/msg_243.exp | 8 +-
tests/usr.bin/xlint/lint1/msg_244.c | 32 ++++++++++-
tests/usr.bin/xlint/lint1/msg_244.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_245.c | 11 ++-
tests/usr.bin/xlint/lint1/msg_245.exp | 6 +-
tests/usr.bin/xlint/lint1/msg_246.c | 21 ++++++-
tests/usr.bin/xlint/lint1/msg_246.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_247.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_247.exp | 6 +-
tests/usr.bin/xlint/lint1/msg_248.c | 5 +-
tests/usr.bin/xlint/lint1/msg_248.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_249.c | 5 +-
tests/usr.bin/xlint/lint1/msg_249.exp | 12 ++--
tests/usr.bin/xlint/lint1/msg_255.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_255.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_256.c | 8 +-
tests/usr.bin/xlint/lint1/msg_256.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_258.c | 15 ++++-
tests/usr.bin/xlint/lint1/msg_258.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_262.c | 5 +-
tests/usr.bin/xlint/lint1/msg_262.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_263.c | 5 +-
tests/usr.bin/xlint/lint1/msg_263.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_264.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_264.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_266.c | 10 ++-
tests/usr.bin/xlint/lint1/msg_266.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_267.c | 8 +-
tests/usr.bin/xlint/lint1/msg_267.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_275.c | 5 +-
tests/usr.bin/xlint/lint1/msg_275.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_276.c | 8 +-
tests/usr.bin/xlint/lint1/msg_276.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_277.c | 8 +-
tests/usr.bin/xlint/lint1/msg_277.exp | 6 +-
tests/usr.bin/xlint/lint1/msg_278.c | 8 +-
tests/usr.bin/xlint/lint1/msg_278.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_279.c | 8 +-
tests/usr.bin/xlint/lint1/msg_279.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_281.c | 9 ++-
tests/usr.bin/xlint/lint1/msg_281.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_282.c | 19 +++++-
tests/usr.bin/xlint/lint1/msg_282.exp | 5 +-
tests/usr.bin/xlint/lint1/msg_284.c | 22 +++++++-
tests/usr.bin/xlint/lint1/msg_284.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_285.c | 8 +-
tests/usr.bin/xlint/lint1/msg_285.exp | 4 +-
tests/usr.bin/xlint/lint1/msg_286.c | 5 +-
tests/usr.bin/xlint/lint1/msg_286.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_287.c | 5 +-
tests/usr.bin/xlint/lint1/msg_287.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_288.c | 23 +++++++-
tests/usr.bin/xlint/lint1/msg_288.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_290.c | 14 ++++-
tests/usr.bin/xlint/lint1/msg_290.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_291.c | 7 +-
tests/usr.bin/xlint/lint1/msg_291.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_293.c | 9 ++-
tests/usr.bin/xlint/lint1/msg_293.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_294.c | 7 +-
tests/usr.bin/xlint/lint1/msg_294.exp | 3 +-
tests/usr.bin/xlint/lint1/msg_295.c | 5 +-
tests/usr.bin/xlint/lint1/msg_295.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_296.c | 12 +++-
tests/usr.bin/xlint/lint1/msg_296.exp | 2 +-
tests/usr.bin/xlint/lint1/msg_299.c | 16 ++++-
tests/usr.bin/xlint/lint1/msg_299.exp | 2 +-
120 files changed, 677 insertions(+), 344 deletions(-)
diffs (truncated from 1965 to 300 lines):
diff -r 7ea9a21fff74 -r b1db1fd9dba2 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Thu Jun 16 16:58:35 2022 +0000
+++ b/distrib/sets/lists/tests/mi Thu Jun 16 21:24:41 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1213 2022/06/16 16:58:35 rillig Exp $
+# $NetBSD: mi,v 1.1214 2022/06/16 21:24:41 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -7002,7 +7002,7 @@
./usr/tests/usr.bin/xlint/lint1/msg_211.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_211.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_212.c tests-usr.bin-tests compattestfile,atf
-./usr/tests/usr.bin/xlint/lint1/msg_212.exp tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/msg_212.exp tests-obsolete obsolete,atf
./usr/tests/usr.bin/xlint/lint1/msg_213.c tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_213.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/xlint/lint1/msg_214.c tests-usr.bin-tests compattestfile,atf
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/check-expect.lua
--- a/tests/usr.bin/xlint/check-expect.lua Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/check-expect.lua Thu Jun 16 21:24:41 2022 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/lua
--- $NetBSD: check-expect.lua,v 1.16 2022/06/16 16:58:36 rillig Exp $
+-- $NetBSD: check-expect.lua,v 1.17 2022/06/16 21:24:41 rillig Exp $
--[[
@@ -64,7 +64,7 @@
-- only the raw message ID, without the actual message text,
-- which makes them harder to understand without looking up more context.
for comment in line:gmatch("/%* expect: (.-) %*/") do
- if not fname:match("^msg_[01]") then
+ if not fname:match("^msg_[012]") then
add_expectation(0, comment)
end
end
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile Thu Jun 16 21:24:41 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.125 2022/06/16 16:58:36 rillig Exp $
+# $NetBSD: Makefile,v 1.126 2022/06/16 21:24:41 rillig Exp $
NOMAN= # defined
MAX_MESSAGE= 349 # see lint1/err.c
@@ -276,6 +276,7 @@
MSG_NO_EXP.070= yes
MSG_NO_EXP.131= yes
MSG_NO_EXP.176= yes
+MSG_NO_EXP.212= yes
# Note: only works for adding tests.
# To remove a test, the $$mi file must be edited manually.
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_202.c
--- a/tests/usr.bin/xlint/lint1/msg_202.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_202.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,18 @@
-/* $NetBSD: msg_202.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_202.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_202.c"
// Test for message: duplicate default in switch [202]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+void
+example(int x)
+{
+ switch (x) {
+ case 1:
+ break;
+ default:
+ break;
+ default:
+ /* expect-1: error: duplicate default in switch [202] */
+ return;
+ }
+}
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_202.exp
--- a/tests/usr.bin/xlint/lint1/msg_202.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_202.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,1 +1,1 @@
-msg_202.c(6): error: syntax error ':' [249]
+msg_202.c(14): error: duplicate default in switch [202]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_204.c
--- a/tests/usr.bin/xlint/lint1/msg_204.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_204.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,8 +1,11 @@
-/* $NetBSD: msg_204.c,v 1.6 2021/04/05 01:35:34 rillig Exp $ */
+/* $NetBSD: msg_204.c,v 1.7 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_204.c"
// Test for message: controlling expressions must have scalar type [204]
+/* Suppress message "argument '%s' unused in function '%s'". */
+/* lint1-extra-flags: -X 231 */
+
extern void
extern_function(void);
@@ -84,18 +87,26 @@
/* C99 6.2.5p20 */
void if_array(struct arr arr) { if (arr.arr) return; }
-void if_struct(struct s s) { if (s) return; } /* expect: 204 *//* expect: 231 */
-void if_union(union u u) { if (u) return; } /* expect: 204 *//* expect: 231 */
+/* expect+1: error: controlling expressions must have scalar type [204] */
+void if_struct(struct s s) { if (s) return; }
+/* expect+1: error: controlling expressions must have scalar type [204] */
+void if_union(union u u) { if (u) return; }
void if_function(void) { if (if_function) return; }
void if_pointer(void *p) { if (p) return; }
/* C99 6.8.5 */
-void while_struct(struct s s) { while (s) return; } /* expect: 204 *//* expect: 231 */
-void for_struct(struct s s) { for (;s;) return; } /* expect: 204 *//* expect: 223 *//* expect: 231 */
-void do_while_struct(struct s s) { do { return; } while (s); } /* expect: 204 *//* expect: 231 */
+/* expect+1: error: controlling expressions must have scalar type [204] */
+void while_struct(struct s s) { while (s) return; }
+/* expect+2: error: controlling expressions must have scalar type [204] */
+/* expect+1: warning: end-of-loop code not reached [223] */
+void for_struct(struct s s) { for (;s;) return; }
+/* expect+1: error: controlling expressions must have scalar type [204] */
+void do_while_struct(struct s s) { do { return; } while (s); }
/*
* C99 6.5.15 for the '?:' operator does not explicitly mention that the
* controlling expression must have a scalar type, curiously.
*/
-int conditional_struct(struct s s) { return s ? 1 : 2; } /* expect: 170 *//* expect: 214 *//* expect: 231 */
+/* expect+2: error: first operand must have scalar type, op ? : [170] */
+/* expect+1: warning: function 'conditional_struct' expects to return value [214] */
+int conditional_struct(struct s s) { return s ? 1 : 2; }
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_204.exp
--- a/tests/usr.bin/xlint/lint1/msg_204.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_204.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,14 +1,8 @@
-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(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(91): error: controlling expressions must have scalar type [204]
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(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(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(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(99): error: controlling expressions must have scalar type [204]
+msg_204.c(102): error: controlling expressions must have scalar type [204]
+msg_204.c(102): warning: end-of-loop code not reached [223]
+msg_204.c(104): error: controlling expressions must have scalar type [204]
+msg_204.c(112): error: first operand must have scalar type, op ? : [170]
+msg_204.c(112): warning: function 'conditional_struct' expects to return value [214]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_205.c
--- a/tests/usr.bin/xlint/lint1/msg_205.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_205.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,13 @@
-/* $NetBSD: msg_205.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_205.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_205.c"
// Test for message: switch expression must have integral type [205]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+/* ARGSUSED */
+void
+example(double x)
+{
+ /* expect+1: error: switch expression must have integral type [205] */
+ switch (x) {
+ }
+}
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_205.exp
--- a/tests/usr.bin/xlint/lint1/msg_205.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_205.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,1 +1,1 @@
-msg_205.c(6): error: syntax error ':' [249]
+msg_205.c(11): error: switch expression must have integral type [205]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_207.c
--- a/tests/usr.bin/xlint/lint1/msg_207.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_207.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,8 @@
-/* $NetBSD: msg_207.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_207.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_207.c"
// Test for message: loop not entered at top [207]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
+/* expect+1: error: syntax error ':' [249] */
+TODO: "Add example code that triggers the above message."
TODO: "Add example code that almost triggers the above message."
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_207.exp
--- a/tests/usr.bin/xlint/lint1/msg_207.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_207.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,1 +1,1 @@
-msg_207.c(6): error: syntax error ':' [249]
+msg_207.c(7): error: syntax error ':' [249]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_208.c
--- a/tests/usr.bin/xlint/lint1/msg_208.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_208.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,8 @@
-/* $NetBSD: msg_208.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_208.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_208.c"
// Test for message: break outside loop or switch [208]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
+/* expect+1: error: syntax error ':' [249] */
+TODO: "Add example code that triggers the above message."
TODO: "Add example code that almost triggers the above message."
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_208.exp
--- a/tests/usr.bin/xlint/lint1/msg_208.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_208.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,1 +1,1 @@
-msg_208.c(6): error: syntax error ':' [249]
+msg_208.c(7): error: syntax error ':' [249]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_209.c
--- a/tests/usr.bin/xlint/lint1/msg_209.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_209.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,11 @@
-/* $NetBSD: msg_209.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_209.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_209.c"
// Test for message: continue outside loop [209]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+void
+example(void)
+{
+ /* expect+1: error: continue outside loop [209] */
+ continue;
+}
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_209.exp
--- a/tests/usr.bin/xlint/lint1/msg_209.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_209.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,1 +1,1 @@
-msg_209.c(6): error: syntax error ':' [249]
+msg_209.c(10): error: continue outside loop [209]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_210.c
--- a/tests/usr.bin/xlint/lint1/msg_210.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_210.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_210.c,v 1.5 2021/02/28 12:40:00 rillig Exp $ */
+/* $NetBSD: msg_210.c,v 1.6 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_210.c"
// Test for message: enum type mismatch between '%s' and '%s' in initialization [210]
@@ -20,6 +20,8 @@
} D;
enum A a1 = A1;
-enum A a2 = B1; /* expect: 210 */
+/* expect+1: warning: enum type mismatch between 'enum A' and 'enum B' in initialization [210] */
+enum A a2 = B1;
C c1 = C1;
-C c2 = D1; /* expect: 210 */
+/* expect+1: warning: enum type mismatch between 'enum typedef C' and 'enum typedef D' in initialization [210] */
+C c2 = D1;
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_210.exp
--- a/tests/usr.bin/xlint/lint1/msg_210.exp Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_210.exp Thu Jun 16 21:24:41 2022 +0000
@@ -1,2 +1,2 @@
-msg_210.c(23): warning: enum type mismatch between 'enum A' and 'enum B' in initialization [210]
-msg_210.c(25): warning: enum type mismatch between 'enum typedef C' and 'enum typedef D' in initialization [210]
+msg_210.c(24): warning: enum type mismatch between 'enum A' and 'enum B' in initialization [210]
+msg_210.c(27): warning: enum type mismatch between 'enum typedef C' and 'enum typedef D' in initialization [210]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_212.c
--- a/tests/usr.bin/xlint/lint1/msg_212.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_212.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: msg_212.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_212.c,v 1.3 2022/06/16 21:24:41 rillig Exp $ */
# 3 "msg_212.c"
// Test for message: cannot return incomplete type [212]
+// This message is not used.
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+int dummy;
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_212.exp
--- a/tests/usr.bin/xlint/lint1/msg_212.exp Thu Jun 16 16:58:35 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-msg_212.c(6): error: syntax error ':' [249]
diff -r 7ea9a21fff74 -r b1db1fd9dba2 tests/usr.bin/xlint/lint1/msg_213.c
--- a/tests/usr.bin/xlint/lint1/msg_213.c Thu Jun 16 16:58:35 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_213.c Thu Jun 16 21:24:41 2022 +0000
@@ -1,7 +1,12 @@
Home |
Main Index |
Thread Index |
Old Index