summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/xlint/Makefile4
-rw-r--r--regress/usr.bin/xlint/test-18.c23
-rw-r--r--regress/usr.bin/xlint/test-18.c.exp3
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