Module Name:    src
Committed By:   rillig
Date:           Sun Jan 24 11:17:44 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_124.c msg_124.exp

Log Message:
lint: demonstrate wrong 124 for flipped == as well

Since the fix in the next commit changes two places in the code, there
must be two wrong error messages that disappear then.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_124.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_124.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_124.c
diff -u src/tests/usr.bin/xlint/lint1/msg_124.c:1.4 src/tests/usr.bin/xlint/lint1/msg_124.c:1.5
--- src/tests/usr.bin/xlint/lint1/msg_124.c:1.4	Sun Jan 24 11:13:22 2021
+++ src/tests/usr.bin/xlint/lint1/msg_124.c	Sun Jan 24 11:17:44 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_124.c,v 1.4 2021/01/24 11:13:22 rillig Exp $	*/
+/*	$NetBSD: msg_124.c,v 1.5 2021/01/24 11:17:44 rillig Exp $	*/
 # 3 "msg_124.c"
 
 // Test for message: illegal pointer combination, op %s [124]
@@ -36,6 +36,10 @@ compare_pointers(const void *vp, const c
 	ok(cp == (void *)0);
 	ok(ip == (void *)0);
 	ok(fp == (void *)0);	/*FIXME*//* expect: 274 */
+	ok((void *)0 == vp);
+	ok((void *)0 == cp);
+	ok((void *)0 == ip);
+	ok((void *)0 == fp);	/*FIXME*//* expect: 274 */
 	ok(vp == 0);
 	ok(cp == 0);
 	ok(ip == 0);

Index: src/tests/usr.bin/xlint/lint1/msg_124.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_124.exp:1.7 src/tests/usr.bin/xlint/lint1/msg_124.exp:1.8
--- src/tests/usr.bin/xlint/lint1/msg_124.exp:1.7	Sun Jan 24 11:13:22 2021
+++ src/tests/usr.bin/xlint/lint1/msg_124.exp	Sun Jan 24 11:17:44 2021
@@ -5,3 +5,4 @@ msg_124.c(32): warning: ANSI C forbids c
 msg_124.c(33): warning: illegal pointer combination (pointer to const char) and (pointer to const int), op == [124]
 msg_124.c(34): warning: illegal pointer combination (pointer to const char) and (pointer to function(int) returning void), op == [124]
 msg_124.c(38): warning: ANSI C forbids comparison of function pointer with 'void *' [274]
+msg_124.c(42): warning: ANSI C forbids comparison of 'void *' with function pointer [274]

Reply via email to