Date: Wed, 30 Aug 2006 18:18:59 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 105344 for review Message-ID: <200608301818.k7UIIx07006099@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105344 Change 105344 by gonzo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608301818.k7UIIx07006099>