Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Don't left shift a negative, use unsigned for bit...



details:   https://anonhg.NetBSD.org/src/rev/8a8f0726dfc5
branches:  trunk
changeset: 321403:8a8f0726dfc5
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Mar 14 18:58:32 2018 +0000

description:
Don't left shift a negative, use unsigned for bit masks.
Appeases GCC 6 in some build configuration (ALL kernel)

ok uwe

diffstat:

 sys/dev/ic/igsfb.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 35a7a1840726 -r 8a8f0726dfc5 sys/dev/ic/igsfb.c
--- a/sys/dev/ic/igsfb.c        Wed Mar 14 17:40:41 2018 +0000
+++ b/sys/dev/ic/igsfb.c        Wed Mar 14 18:58:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igsfb.c,v 1.57 2018/01/24 05:35:58 riastradh Exp $ */
+/*     $NetBSD: igsfb.c,v 1.58 2018/03/14 18:58:32 maya Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Valeriy E. Ushakov
@@ -31,7 +31,7 @@
  * Integraphics Systems IGA 168x and CyberPro series.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.57 2018/01/24 05:35:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.58 2018/03/14 18:58:32 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1001,7 +1001,7 @@
                /* clear trailing bits in the "partial" mask bytes */
                trailing_bits = p->size.x & 0x07;
                if (trailing_bits != 0) {
-                       const u_int cutmask = ~((~0) << trailing_bits);
+                       const u_int cutmask = ~((~0U) << trailing_bits);
                        u_char *mp;
                        u_int i;
 



Home | Main Index | Thread Index | Old Index