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: make test 130 platform...
details: https://anonhg.NetBSD.org/src/rev/f3f9d0121c0f
branches: trunk
changeset: 379280:f3f9d0121c0f
user: rillig <rillig%NetBSD.org@localhost>
date: Tue May 25 19:04:07 2021 +0000
description:
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]
diffstat:
tests/usr.bin/xlint/lint1/msg_130.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 0e83447e9674 -r f3f9d0121c0f tests/usr.bin/xlint/lint1/msg_130.c
--- a/tests/usr.bin/xlint/lint1/msg_130.c Tue May 25 16:50:49 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_130.c Tue May 25 19:04:07 2021 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index