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 d_cast_init o...



details:   https://anonhg.NetBSD.org/src/rev/c086d2906834
branches:  trunk
changeset: 380050:c086d2906834
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 03 19:34:47 2021 +0000

description:
tests/lint: fix test d_cast_init on macppc

On macppc, char == unsigned, which generated the following unintended
warnings:

d_cast_init.c(18): warning: initialization of unsigned with negative
    constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
    constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
    constant [221]
d_cast_init.c(18): warning: initialization of unsigned with negative
    constant [221]

diffstat:

 tests/usr.bin/xlint/lint1/d_cast_init.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e1d5182165c6 -r c086d2906834 tests/usr.bin/xlint/lint1/d_cast_init.c
--- a/tests/usr.bin/xlint/lint1/d_cast_init.c   Sat Jul 03 19:31:22 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_cast_init.c   Sat Jul 03 19:34:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_cast_init.c,v 1.4 2021/01/31 14:57:28 rillig Exp $   */
+/*     $NetBSD: d_cast_init.c,v 1.5 2021/07/03 19:34:47 rillig Exp $   */
 # 3 "d_cast_init.c"
 
 /* cast initialization */
@@ -8,7 +8,7 @@ typedef unsigned char u_char;
 struct sockaddr_x25 {
        u_char x25_len;
        u_char x25_family;
-       char x25_udata[4];
+       signed char x25_udata[4];
 };
 
 struct sockaddr_x25 x25_dgmask = {



Home | Main Index | Thread Index | Old Index