Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 lint: demonstrate wrong 124 for fl...
details: https://anonhg.NetBSD.org/src/rev/d5591dc86209
branches: trunk
changeset: 980111:d5591dc86209
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jan 24 11:17:44 2021 +0000
description:
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.
diffstat:
tests/usr.bin/xlint/lint1/msg_124.c | 6 +++++-
tests/usr.bin/xlint/lint1/msg_124.exp | 1 +
2 files changed, 6 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r 2c0422a4415a -r d5591dc86209 tests/usr.bin/xlint/lint1/msg_124.c
--- a/tests/usr.bin/xlint/lint1/msg_124.c Sun Jan 24 11:13:22 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_124.c Sun Jan 24 11:17:44 2021 +0000
@@ -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 @@
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);
diff -r 2c0422a4415a -r d5591dc86209 tests/usr.bin/xlint/lint1/msg_124.exp
--- a/tests/usr.bin/xlint/lint1/msg_124.exp Sun Jan 24 11:13:22 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_124.exp Sun Jan 24 11:17:44 2021 +0000
@@ -5,3 +5,4 @@
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]
Home |
Main Index |
Thread Index |
Old Index