svn commit: r232730 - head/sys/x86/include
Tijl Coosemans
tijl at FreeBSD.org
Fri Mar 9 16:39:34 UTC 2012
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) ? \
More information about the svn-src-all
mailing list