Module Name: src Committed By: rillig Date: Mon Feb 27 21:59:14 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: msg_230_uchar.c Log Message: tests/lint: sync test for nonportable character comparisons Message 230 was changed on 2023-02-22 but only tested on signed char platforms. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/msg_230_uchar.c 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_230_uchar.c diff -u src/tests/usr.bin/xlint/lint1/msg_230_uchar.c:1.10 src/tests/usr.bin/xlint/lint1/msg_230_uchar.c:1.11 --- src/tests/usr.bin/xlint/lint1/msg_230_uchar.c:1.10 Wed Feb 22 22:30:40 2023 +++ src/tests/usr.bin/xlint/lint1/msg_230_uchar.c Mon Feb 27 21:59:14 2023 @@ -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 @@ compare_plain_char(char c) 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 @@ void 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')