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: sync test for nonporta...
details: https://anonhg.NetBSD.org/src/rev/d7dfde293874
branches: trunk
changeset: 373773:d7dfde293874
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Feb 27 21:59:14 2023 +0000
description:
tests/lint: sync test for nonportable character comparisons
Message 230 was changed on 2023-02-22 but only tested on signed char
platforms.
diffstat:
tests/usr.bin/xlint/lint1/msg_230_uchar.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (55 lines):
diff -r 92461084ed22 -r d7dfde293874 tests/usr.bin/xlint/lint1/msg_230_uchar.c
--- a/tests/usr.bin/xlint/lint1/msg_230_uchar.c Mon Feb 27 21:15:09 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_230_uchar.c Mon Feb 27 21:59:14 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_230_uchar.c,v 1.10 2023/02/22 22:30:40 rillig Exp $ */
+/* $NetBSD: msg_230_uchar.c,v 1.11 2023/02/27 21:59:14 rillig Exp $ */
# 3 "msg_230_uchar.c"
// Test for message: nonportable character comparison '%s' [230]
@@ -46,26 +46,26 @@
void
compare_plain_char_yoda(char c)
{
- /* expect+1: warning: nonportable character comparison '? == -129' [230] */
+ /* expect+1: warning: nonportable character comparison '-129 == ?' [230] */
if (-129 == c)
return;
- /* expect+1: warning: nonportable character comparison '? == -128' [230] */
+ /* expect+1: warning: nonportable character comparison '-128 == ?' [230] */
if (-128 == c)
return;
- /* expect+1: warning: nonportable character comparison '? == -1' [230] */
+ /* expect+1: warning: nonportable character comparison '-1 == ?' [230] */
if (-1 == c)
return;
if (0 == c)
return;
if (127 == c)
return;
- /* expect+1: warning: nonportable character comparison '? == 128' [230] */
+ /* expect+1: warning: nonportable character comparison '128 == ?' [230] */
if (128 == c)
return;
- /* expect+1: warning: nonportable character comparison '? == 255' [230] */
+ /* expect+1: warning: nonportable character comparison '255 == ?' [230] */
if (255 == c)
return;
- /* expect+1: warning: nonportable character comparison '? == 256' [230] */
+ /* expect+1: warning: nonportable character comparison '256 == ?' [230] */
if (256 == c)
return;
}
@@ -121,9 +121,9 @@
compare_with_character_literal(char ch)
{
/*
- * These comparisons are portable since the character constant is
- * interpreted using the type 'char' on the exact same platform as
- * where the comparison takes place.
+ * FIXME: These comparisons are portable since the character constant
+ * is 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')
Home |
Main Index |
Thread Index |
Old Index