Don't left shift a negative, use unsigned for bit masks.

Appeases GCC 6 in some build configuration (ALL kernel)

ok uwe
This commit is contained in:
maya 2018-03-14 18:58:32 +00:00
parent a28f31b51d
commit 832f757f9d

View File

@ -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 @@ igsfb_set_cursor(struct igsfb_devconfig *dc, const struct wsdisplay_cursor *p)
/* 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;