summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_351.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2023-07-07 19:45:22 +0000
committerrillig <rillig@NetBSD.org>2023-07-07 19:45:22 +0000
commit4175df945b048e5aeed932baf36d22ba89310121 (patch)
treeb9af2533f06e958404f3ad74e19b5786aa20dc89 /tests/usr.bin/xlint/lint1/msg_351.c
parentf0b07974431e15088bc38f5695ef7c1f9da599f8 (diff)
lint: warn about function definitions without header declaration
The existing warning was only issued for function declarations, not for function definitions. The interesting change in the tests is in msg_351.c. Many other tests use non-static functions due to their syntactic brevity. In these tests, the warning is disabled individually, to allow new functions to be added without generating warning 351.
Diffstat (limited to 'tests/usr.bin/xlint/lint1/msg_351.c')
-rw-r--r--tests/usr.bin/xlint/lint1/msg_351.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/usr.bin/xlint/lint1/msg_351.c b/tests/usr.bin/xlint/lint1/msg_351.c
index f6842eab1ec..8e38820340c 100644
--- a/tests/usr.bin/xlint/lint1/msg_351.c
+++ b/tests/usr.bin/xlint/lint1/msg_351.c
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_351.c,v 1.6 2023/07/07 00:25:23 rillig Exp $ */
+/* $NetBSD: msg_351.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */
# 3 "msg_351.c"
// Test for message 351: missing%s header declaration for '%s' [351]
@@ -23,13 +23,13 @@ void func_decl(void);
extern void extern_func_decl(void);
static int static_func_decl(void);
-// TODO: missing header declaration
+/* expect+3: warning: missing header declaration for 'func_def' [351] */
void
func_def(void)
{
}
-// TODO: missing header declaration
+/* expect+3: warning: missing header declaration for 'extern_func_def' [351] */
extern void
extern_func_def(void)
{