ia64: fix byteswap conversion warning

Same fix as went in for other architectures.

URL: http://sourceware.org/bugzilla/show_bug.cgi?id=12194
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2012-08-01 20:56:03 -04:00
parent bca393295a
commit 0c41943a4d
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2012-08-03 Mike Frysinger <vapier@gentoo.org>
[BZ #12194]
* sysdeps/ia64/bits/byteswap-16.h (__bswap_16): Avoid -Wconversion
warning.
* sysdeps/ia64/bits/byteswap.h (__bswap_constant_16): Likewise.
2012-08-03 Joseph Myers <joseph@codesourcery.com> 2012-08-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/ia64/configure.in (arch_minimum_kernel): * sysdeps/unix/sysv/linux/ia64/configure.in (arch_minimum_kernel):

View File

@ -23,7 +23,7 @@
#if defined __GNUC__ && __GNUC__ >= 2 #if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_16(x) \ # define __bswap_16(x) \
(__extension__ \ (__extension__ \
({ register unsigned short int __v, __x = (x); \ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (x)) \ if (__builtin_constant_p (x)) \
__v = __bswap_constant_16 (__x); \ __v = __bswap_constant_16 (__x); \
else \ else \

View File

@ -25,7 +25,7 @@
/* Swap bytes in 16 bit value. */ /* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \ #define __bswap_constant_16(x) \
((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) ((unsigned short int)((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
/* Get __bswap_16. */ /* Get __bswap_16. */
#include <bits/byteswap-16.h> #include <bits/byteswap-16.h>