Module Name:    src
Committed By:   christos
Date:           Wed Apr 22 18:04:02 UTC 2009

Modified Files:
        src/sys/sys: cdefs.h

Log Message:
Cast the argument of the __BIT to an unsigned type, since it does not make
sense for it to be signed and gcc complains if it is.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/sys/cdefs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.73 src/sys/sys/cdefs.h:1.74
--- src/sys/sys/cdefs.h:1.73	Thu Mar 26 18:16:44 2009
+++ src/sys/sys/cdefs.h	Wed Apr 22 14:04:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.73 2009/03/26 22:16:44 gmcgarry Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.74 2009/04/22 18:04:02 christos Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -396,7 +396,7 @@
 
 /* __BIT(n): nth bit, where __BIT(0) == 0x1. */
 #define	__BIT(__n)	\
-	(((__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (__n)))
+    (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (uintmax_t)(__n)))
 
 /* __BITS(m, n): bits m through n, m < n. */
 #define	__BITS(__m, __n)	\

Reply via email to