svn commit: r191589 - projects/mips/sys/mips/include
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Mon Apr 27 19:19:00 UTC 2009
Author: gonzo
Date: Mon Apr 27 19:18:55 2009
New Revision: 191589
URL: http://svn.freebsd.org/changeset/base/191589
Log:
- Cast argument to proper type in order to avoid warnings like
"shift value is too large for given type"
Modified:
projects/mips/sys/mips/include/endian.h
Modified: projects/mips/sys/mips/include/endian.h
==============================================================================
--- projects/mips/sys/mips/include/endian.h Mon Apr 27 19:15:33 2009 (r191588)
+++ projects/mips/sys/mips/include/endian.h Mon Apr 27 19:18:55 2009 (r191589)
@@ -108,12 +108,12 @@ __bswap64_var(__uint64_t _x)
((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
}
-#define __bswap16(x) (__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \
- __bswap16_var(x))
-#define __bswap32(x) (__uint32_t)(__is_constant(x) ? __bswap32_const(x) : \
- __bswap32_var(x))
-#define __bswap64(x) (__uint64_t)(__is_constant(x) ? __bswap64_const(x) : \
- __bswap64_var(x))
+#define __bswap16(x) (__uint16_t)(__is_constant(x) ? \
+ __bswap16_const((__uint16_t)x) : __bswap16_var((__uint16_t)x))
+#define __bswap32(x) (__uint32_t)(__is_constant(x) ? \
+ __bswap32_const((__uint32_t)x) : __bswap32_var((__uint32_t)x))
+#define __bswap64(x) (__uint64_t)(__is_constant(x) ? \
+ __bswap64_const((__uint64_t)x) : __bswap64_var((__uint64_t)x))
#ifdef __MIPSEB__
#define __htonl(x) ((__uint32_t)(x))
More information about the svn-src-projects
mailing list