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 tests/lint: fix test about "non-po...
details: https://anonhg.NetBSD.org/src/rev/25577b5222b5
branches: trunk
changeset: 363902:25577b5222b5
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Mar 14 20:25:26 2022 +0000
description:
tests/lint: fix test about "non-portable character constant" on uchar
The warning is wrong, and it has been for a long time. For now just fix
the test to match the actual output. Seen on evbarm, which is one of
the platforms where a plain char is unsigned.
Noticed by Martin.
diffstat:
tests/usr.bin/xlint/lint1/msg_230_uchar.c | 4 +++-
tests/usr.bin/xlint/lint1/msg_230_uchar.exp | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 23c8eb3c736f -r 25577b5222b5 tests/usr.bin/xlint/lint1/msg_230_uchar.c
--- a/tests/usr.bin/xlint/lint1/msg_230_uchar.c Mon Mar 14 18:38:11 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_230_uchar.c Mon Mar 14 20:25:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_230_uchar.c,v 1.7 2022/02/26 11:13:01 rillig Exp $ */
+/* $NetBSD: msg_230_uchar.c,v 1.8 2022/03/14 20:25:26 rillig Exp $ */
# 3 "msg_230_uchar.c"
// Test for message: nonportable character comparison '%s %d' [230]
@@ -125,8 +125,10 @@
* interpreted using the type 'char' on the exact same platform as
* where the comparison takes place.
*/
+ /* expect+1: warning: nonportable character comparison '== 128' [230] */
if (ch == '\200')
return;
+ /* expect+1: warning: nonportable character comparison '== 255' [230] */
if (ch == '\377')
return;
if (ch == '\000')
diff -r 23c8eb3c736f -r 25577b5222b5 tests/usr.bin/xlint/lint1/msg_230_uchar.exp
--- a/tests/usr.bin/xlint/lint1/msg_230_uchar.exp Mon Mar 14 18:38:11 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_230_uchar.exp Mon Mar 14 20:25:26 2022 +0000
@@ -17,3 +17,5 @@
msg_230_uchar.c(109): warning: nonportable character comparison '>= 128' [230]
msg_230_uchar.c(113): warning: nonportable character comparison '> 128' [230]
msg_230_uchar.c(116): warning: nonportable character comparison '>= 129' [230]
+msg_230_uchar.c(129): warning: nonportable character comparison '== 128' [230]
+msg_230_uchar.c(132): warning: nonportable character comparison '== 255' [230]
Home |
Main Index |
Thread Index |
Old Index