diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2005-12-01 05:19:26 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2005-12-01 05:19:26 +0000 |
commit | 897171a81176afa8882874f01be04e8cc66da1fa (patch) | |
tree | c486d93b1cbf53f4d552c94006d2daa8ade2fb17 /regress | |
parent | ceb57bf35703528fc6f616b6a1b9c30283f61cbe (diff) |
Regress test for testing unsigned less than 0
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/xlint/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-9.c | 19 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-9.c.exp | 2 |
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: |