Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/misc Try to fix the evbppc-powerpc64 build



details:   https://anonhg.NetBSD.org/src/rev/c109ce295346
branches:  trunk
changeset: 365177:c109ce295346
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Aug 03 16:31:04 2018 +0000

description:
Try to fix the evbppc-powerpc64 build

Avoid "comparison between signed and unsigned integer expressions" on
Big-Endian hosts.

diffstat:

 common/lib/libc/misc/ubsan.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 6179e15c38b5 -r c109ce295346 common/lib/libc/misc/ubsan.c
--- a/common/lib/libc/misc/ubsan.c      Fri Aug 03 15:46:41 2018 +0000
+++ b/common/lib/libc/misc/ubsan.c      Fri Aug 03 16:31:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ubsan.c,v 1.2 2018/08/03 03:12:32 kamil Exp $  */
+/*     $NetBSD: ubsan.c,v 1.3 2018/08/03 16:31:04 kamil Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,9 +38,9 @@
 
 #include <sys/cdefs.h>
 #if defined(_KERNEL)
-__KERNEL_RCSID(0, "$NetBSD: ubsan.c,v 1.2 2018/08/03 03:12:32 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubsan.c,v 1.3 2018/08/03 16:31:04 kamil Exp $");
 #else
-__RCSID("$NetBSD: ubsan.c,v 1.2 2018/08/03 03:12:32 kamil Exp $");
+__RCSID("$NetBSD: ubsan.c,v 1.3 2018/08/03 16:31:04 kamil Exp $");
 #endif
 
 #if defined(_KERNEL)
@@ -1269,7 +1269,7 @@
 #if BYTE_ORDER == LITTLE_ENDIAN
        for (zI = sizeof(ulongest) - 1; zI >= 0; zI--) {
 #else
-       for (zI = 0; zI < sizeof(ulongest); zI++) {
+       for (zI = 0; zI < (ssize_t)sizeof(ulongest); zI++) {
 #endif
                snprintf(szBuf, sizeof(szBuf), "%02" PRIx8, rgNumber[zI]);
                strlcat(pBuffer, szBuf, zBUfferLength);



Home | Main Index | Thread Index | Old Index