summaryrefslogtreecommitdiff
path: root/regress/usr.bin/xlint/test-16.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-03-20 05:06:38 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-03-20 05:06:38 +0000
commit3952d1002ad14f0c04c5e6dd2c7c17ef5093c425 (patch)
treec52b0bf19cdc467f6a5baf47ac4f9adba48983c5 /regress/usr.bin/xlint/test-16.c
parent7a6bb336cbb26a5fd00bf8e7fdefede6589479d9 (diff)
Add a regression test for false positive with ((x == y) == z), fixed in
r1.31 of usr.bin/xlint/lint1/tree.c
Diffstat (limited to 'regress/usr.bin/xlint/test-16.c')
-rw-r--r--regress/usr.bin/xlint/test-16.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/regress/usr.bin/xlint/test-16.c b/regress/usr.bin/xlint/test-16.c
new file mode 100644
index 00000000000..3cedb209fb8
--- /dev/null
+++ b/regress/usr.bin/xlint/test-16.c
@@ -0,0 +1,22 @@
+ /* $OpenBSD: test-16.c,v 1.1 2006/03/20 05:06:37 cloder Exp $ */
+
+/*
+ * Placed in the public domain by Chad Loder <cloder@openbsd.org>.
+ *
+ * Test lint dealing with cascaded ==
+ */
+#include <sys/types.h>
+
+/* ARGSUSED */
+int
+main(int argc, char* argv[])
+{
+ mode_t mode;
+
+ mode = (mode_t)argc;
+
+ if ((((mode) & 0170000) == 0100000) == 0)
+ return 1;
+
+ return 0;
+}