summaryrefslogtreecommitdiff
path: root/regress/usr.bin/xlint
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin/xlint')
-rw-r--r--regress/usr.bin/xlint/Makefile4
-rw-r--r--regress/usr.bin/xlint/test-9.c19
-rw-r--r--regress/usr.bin/xlint/test-9.c.exp2
3 files changed, 23 insertions, 2 deletions
diff --git a/regress/usr.bin/xlint/Makefile b/regress/usr.bin/xlint/Makefile
index b172d9e7fb8..13ed4f55bac 100644
--- a/regress/usr.bin/xlint/Makefile
+++ b/regress/usr.bin/xlint/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.8 2005/12/01 05:07:55 cloder Exp $
+# $OpenBSD: Makefile,v 1.9 2005/12/01 05:19:25 cloder Exp $
-TEST_MODULES= 1 2 3 4 5 6 7 8
+TEST_MODULES= 1 2 3 4 5 6 7 8 9
LINT= lint
LINTFLAGS?= -chapbx
diff --git a/regress/usr.bin/xlint/test-9.c b/regress/usr.bin/xlint/test-9.c
new file mode 100644
index 00000000000..0d311647651
--- /dev/null
+++ b/regress/usr.bin/xlint/test-9.c
@@ -0,0 +1,19 @@
+/* $OpenBSD: test-9.c,v 1.1 2005/12/01 05:19:25 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.
+ */
+
+/* ARGSUSED */
+int
+main(int argc, char* argv[])
+{
+ unsigned int i;
+ for (i = 100; i >= 0; i--)
+ continue;
+
+ return 0;
+}
diff --git a/regress/usr.bin/xlint/test-9.c.exp b/regress/usr.bin/xlint/test-9.c.exp
new file mode 100644
index 00000000000..75eaa3f9631
--- /dev/null
+++ b/regress/usr.bin/xlint/test-9.c.exp
@@ -0,0 +1,2 @@
+test-9.c(15): warning: comparison of unsigned int with 0, op >=
+Lint pass2: