From 2174c6dd8555f654c30df2f8f3321b69e0f736f8 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 Jun 2012 15:49:33 +0200 Subject: Avoid -Wconversion warning for htons --- sysdeps/s390/bits/byteswap-16.h | 4 ++-- sysdeps/s390/bits/byteswap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sysdeps/s390') diff --git a/sysdeps/s390/bits/byteswap-16.h b/sysdeps/s390/bits/byteswap-16.h index 8bfec78..126f382 100644 --- a/sysdeps/s390/bits/byteswap-16.h +++ b/sysdeps/s390/bits/byteswap-16.h @@ -28,7 +28,7 @@ # if __WORDSIZE == 64 # define __bswap_16(x) \ (__extension__ \ - ({ unsigned short int __v, __x = (x); \ + ({ unsigned short int __v, __x = (unsigned short int) (x); \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_16 (__x); \ else { \ @@ -41,7 +41,7 @@ # else # define __bswap_16(x) \ (__extension__ \ - ({ unsigned short int __v, __x = (x); \ + ({ unsigned short int __v, __x = (unsigned short int) (x); \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_16 (__x); \ else { \ diff --git a/sysdeps/s390/bits/byteswap.h b/sysdeps/s390/bits/byteswap.h index e91d4cc..3ae6436 100644 --- a/sysdeps/s390/bits/byteswap.h +++ b/sysdeps/s390/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. s390 version. - Copyright (C) 2000-2003, 2008, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2000-2012 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -27,7 +27,7 @@ #define _BITS_BYTESWAP_H 1 #define __bswap_constant_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) + ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) /* Get __bswap_16. */ #include -- cgit v1.1