diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-04-20 04:03:06 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-04-20 04:03:06 +0000 |
commit | 92c27456c3dd43c210e53ed198574cb2b7a4607a (patch) | |
tree | 1bc3a75ee113f885c1aa491860a0fc63ac75db10 /regress | |
parent | 00d56bd9227f67c61586bcb87e2c3410e50a8b9a (diff) |
Test for (soon to be coming) LINTUSED special comment
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/xlint/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-18.c | 23 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-18.c.exp | 3 |
3 files changed, 28 insertions, 2 deletions
diff --git a/regress/usr.bin/xlint/Makefile b/regress/usr.bin/xlint/Makefile index 7919d193e7f..eb60b80252f 100644 --- a/regress/usr.bin/xlint/Makefile +++ b/regress/usr.bin/xlint/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.20 2006/04/20 03:39:14 cloder Exp $ +# $OpenBSD: Makefile,v 1.21 2006/04/20 04:03:05 cloder Exp $ -TEST_MODULES= 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 +TEST_MODULES= 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 LINT= lint LINTFLAGS?= -chapbx diff --git a/regress/usr.bin/xlint/test-18.c b/regress/usr.bin/xlint/test-18.c new file mode 100644 index 00000000000..3610e4354ab --- /dev/null +++ b/regress/usr.bin/xlint/test-18.c @@ -0,0 +1,23 @@ + /* $OpenBSD: test-18.c,v 1.1 2006/04/20 04:03:05 cloder Exp $ */ + +/* + * Placed in the public domain by Chad Loder <cloder@openbsd.org>. + * + * Test lint dealing with LINTUSED comments. + */ + +/* LINTUSED */ +int g; + +int u; + +/* ARGSUSED */ +int +main(int argc, char* argv[]) +{ + /* LINTUSED */ + int a, b; + int c; + + return 0; +} diff --git a/regress/usr.bin/xlint/test-18.c.exp b/regress/usr.bin/xlint/test-18.c.exp new file mode 100644 index 00000000000..0035ce58b29 --- /dev/null +++ b/regress/usr.bin/xlint/test-18.c.exp @@ -0,0 +1,3 @@ +test-18.c:20: warning: c unused in function main +Lint pass2: +test-18.c:12: u defined, but never used |