diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/xlint/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-8.c | 18 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-8.c.exp | 2 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-8.h | 4 |
4 files changed, 26 insertions, 2 deletions
diff --git a/regress/usr.bin/xlint/Makefile b/regress/usr.bin/xlint/Makefile index 0324ddb189f..b172d9e7fb8 100644 --- a/regress/usr.bin/xlint/Makefile +++ b/regress/usr.bin/xlint/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.7 2005/11/30 19:44:08 cloder Exp $ +# $OpenBSD: Makefile,v 1.8 2005/12/01 05:07:55 cloder Exp $ -TEST_MODULES= 1 2 3 4 5 6 7 +TEST_MODULES= 1 2 3 4 5 6 7 8 LINT= lint LINTFLAGS?= -chapbx diff --git a/regress/usr.bin/xlint/test-8.c b/regress/usr.bin/xlint/test-8.c new file mode 100644 index 00000000000..6160149c317 --- /dev/null +++ b/regress/usr.bin/xlint/test-8.c @@ -0,0 +1,18 @@ +/* $OpenBSD: test-8.c,v 1.1 2005/12/01 05:07:55 cloder Exp $ */ + +/* + * Placed in the public domain by Chad Loder <cloder@openbsd.org>. + * + * Test warning on things declared in the translation unit but never + * defined. + */ +#include "test-8.h" + +int foo(int); /* warning: declared but never used or defined */ + +/* ARGSUSED */ +int +main(int argc, char* argv[]) +{ + return 0; +} diff --git a/regress/usr.bin/xlint/test-8.c.exp b/regress/usr.bin/xlint/test-8.c.exp new file mode 100644 index 00000000000..8e2e1628b4e --- /dev/null +++ b/regress/usr.bin/xlint/test-8.c.exp @@ -0,0 +1,2 @@ +Lint pass2: +foo declared( test-8.c(11) ), but never used or defined diff --git a/regress/usr.bin/xlint/test-8.h b/regress/usr.bin/xlint/test-8.h new file mode 100644 index 00000000000..04225e88d15 --- /dev/null +++ b/regress/usr.bin/xlint/test-8.h @@ -0,0 +1,4 @@ +/* $OpenBSD: test-8.h,v 1.1 2005/12/01 05:07:55 cloder Exp $ */ + +int bar(int); /* should not warn */ + |