diff options
| author | rillig <rillig@NetBSD.org> | 2023-07-07 19:45:22 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-07-07 19:45:22 +0000 |
| commit | 4175df945b048e5aeed932baf36d22ba89310121 (patch) | |
| tree | b9af2533f06e958404f3ad74e19b5786aa20dc89 /tests/usr.bin/xlint/lint1/init_braces.c | |
| parent | f0b07974431e15088bc38f5695ef7c1f9da599f8 (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/init_braces.c')
| -rw-r--r-- | tests/usr.bin/xlint/lint1/init_braces.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/usr.bin/xlint/lint1/init_braces.c b/tests/usr.bin/xlint/lint1/init_braces.c index 9f5821ddda7..fa0eecfc439 100644 --- a/tests/usr.bin/xlint/lint1/init_braces.c +++ b/tests/usr.bin/xlint/lint1/init_braces.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_braces.c,v 1.7 2023/07/01 06:09:24 rillig Exp $ */ +/* $NetBSD: init_braces.c,v 1.8 2023/07/07 19:45:22 rillig Exp $ */ # 3 "init_braces.c" /* @@ -9,6 +9,8 @@ * C11 6.7.9 */ +/* lint1-extra-flags: -X 351 */ + void init_int(void) { |
