Module Name: src Committed By: rillig Date: Sun Sep 5 18:39:58 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: msg_280.c msg_280.exp Log Message: tests/lint: clean up test for misplaced lint comments A varargs comment that appears in the function body is already covered by varargs_bad_body. Cleaning up this test makes sure that the warning is indeed triggered by the comment in the parameters declaration. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_280.c \ src/tests/usr.bin/xlint/lint1/msg_280.exp 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/msg_280.c diff -u src/tests/usr.bin/xlint/lint1/msg_280.c:1.3 src/tests/usr.bin/xlint/lint1/msg_280.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_280.c:1.3 Mon Aug 30 19:48:21 2021 +++ src/tests/usr.bin/xlint/lint1/msg_280.c Sun Sep 5 18:39:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_280.c,v 1.3 2021/08/30 19:48:21 rillig Exp $ */ +/* $NetBSD: msg_280.c,v 1.4 2021/09/05 18:39:58 rillig Exp $ */ # 3 "msg_280.c" // Test for message: must be outside function: /* %s */ [280] @@ -14,8 +14,6 @@ void /* XXX: Why is this comment considered 'outside' enough? */ varargs_bad_param(/* VARARGS */ const char *str, ...) { - /* expect+1: warning: must be outside function: */ - /* VARARGS */ (void)str; } Index: src/tests/usr.bin/xlint/lint1/msg_280.exp diff -u src/tests/usr.bin/xlint/lint1/msg_280.exp:1.3 src/tests/usr.bin/xlint/lint1/msg_280.exp:1.4 --- src/tests/usr.bin/xlint/lint1/msg_280.exp:1.3 Mon Aug 30 19:48:21 2021 +++ src/tests/usr.bin/xlint/lint1/msg_280.exp Sun Sep 5 18:39:58 2021 @@ -1,7 +1,6 @@ -msg_280.c(18): warning: must be outside function: /* VARARGS */ [280] -msg_280.c(24): warning: must be outside function: /* VARARGS */ [280] -msg_280.c(34): warning: must be outside function: /* VARARGS */ [280] -msg_280.c(43): warning: must be outside function: /* ARGSUSED */ [280] -msg_280.c(40): warning: argument 'str' unused in function 'argsused_bad_body' [231] -msg_280.c(50): warning: must be outside function: /* PRINTFLIKE */ [280] -msg_280.c(58): warning: must be outside function: /* SCANFLIKE */ [280] +msg_280.c(22): warning: must be outside function: /* VARARGS */ [280] +msg_280.c(32): warning: must be outside function: /* VARARGS */ [280] +msg_280.c(41): warning: must be outside function: /* ARGSUSED */ [280] +msg_280.c(38): warning: argument 'str' unused in function 'argsused_bad_body' [231] +msg_280.c(48): warning: must be outside function: /* PRINTFLIKE */ [280] +msg_280.c(56): warning: must be outside function: /* SCANFLIKE */ [280]