Module Name: src Committed By: rillig Date: Tue May 25 19:04:07 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: msg_130.c Log Message: tests/lint: make test 130 platform-independent On 32-bit platforms such as i386 and sparc, sizeof(int) == sizeof(long), which produced an additional unintended lint error message: msg_130.c(78): error: duplicate case in switch: 4 [199] To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/msg_130.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_130.c diff -u src/tests/usr.bin/xlint/lint1/msg_130.c:1.13 src/tests/usr.bin/xlint/lint1/msg_130.c:1.14 --- src/tests/usr.bin/xlint/lint1/msg_130.c:1.13 Fri Apr 2 13:16:38 2021 +++ src/tests/usr.bin/xlint/lint1/msg_130.c Tue May 25 19:04:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_130.c,v 1.13 2021/04/02 13:16:38 rillig Exp $ */ +/* $NetBSD: msg_130.c,v 1.14 2021/05/25 19:04:07 rillig Exp $ */ # 3 "msg_130.c" // Test for message: enum type mismatch: '%s' '%s' '%s' [130] @@ -61,7 +61,7 @@ switch_example(enum color c) */ enum { sizeof_int = sizeof(int), - sizeof_long = sizeof(long) + sizeof_short = sizeof(short) }; enum { @@ -75,7 +75,7 @@ enum_constant_from_unnamed_type(int x) switch (x) { case sizeof_int: return 1; - case sizeof_long: + case sizeof_short: return 2; default: break;