PERFORCE change 105344 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Wed Aug 30 18:19:00 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=105344

Change 105344 by gonzo at gonzo_hq on 2006/08/30 18:18:00

	o Explicitly cast __bswapXX routines to respective unsigned int. 
	    Having been unwinded with signed long arguments by preprocessor
	    these defines are casted to signed type by gcc.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/include/endian.h#4 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/include/endian.h#4 (text+ko) ====

@@ -105,11 +105,11 @@
 	    ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
 }
 
-#define	__bswap16(x)	(__is_constant(x) ? __bswap16_const(x) : \
+#define	__bswap16(x)	(__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \
 	__bswap16_var(x))
-#define	__bswap32(x)	(__is_constant(x) ? __bswap32_const(x) : \
+#define	__bswap32(x)	(__uint32_t)(__is_constant(x) ? __bswap32_const(x) : \
 	__bswap32_var(x))
-#define	__bswap64(x)	(__is_constant(x) ? __bswap64_const(x) : \
+#define	__bswap64(x)	(__uint64_t)(__is_constant(x) ? __bswap64_const(x) : \
 	__bswap64_var(x))
 
 #ifdef _MIPSEB


More information about the p4-projects mailing list