Date: Mon, 27 Apr 2009 19:18:55 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r191589 - projects/mips/sys/mips/include Message-ID: <200904271918.n3RJItqM024247@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904271918.n3RJItqM024247>