Author: tijl
Date: Fri Mar  9 16:39:34 2012
New Revision: 232730
URL: http://svn.freebsd.org/changeset/base/232730

Log:
  Cast the expression in __bswap16(x) to __uint16_t because it is promoted
  to int.
  
  Reviewed by:  dim

Modified:
  head/sys/x86/include/endian.h

Modified: head/sys/x86/include/endian.h
==============================================================================
--- head/sys/x86/include/endian.h       Fri Mar  9 16:21:40 2012        
(r232729)
+++ head/sys/x86/include/endian.h       Fri Mar  9 16:39:34 2012        
(r232730)
@@ -70,8 +70,8 @@
        (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32))
 
 #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P
-#define        __bswap16(x)                    \
-       (__builtin_constant_p(x) ?      \
+#define        __bswap16(x)                            \
+       (__uint16_t)(__builtin_constant_p(x) ?  \
            __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))
 #define        __bswap32(x)                    \
        (__builtin_constant_p(x) ?      \
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to