about summary refs log tree commit diff
path: root/bits/byteswap-16.h
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-06-21 15:49:33 +0200
committerAndreas Jaeger <aj@suse.de>2012-06-21 15:49:33 +0200
commit2174c6dd8555f654c30df2f8f3321b69e0f736f8 (patch)
tree096e7dcef460ada575b6d0a34cc659c63f9fe83a /bits/byteswap-16.h
parent416bf844227d37b043b16be28c9523eeaecd3de3 (diff)
downloadglibc-2174c6dd8555f654c30df2f8f3321b69e0f736f8.tar.gz
glibc-2174c6dd8555f654c30df2f8f3321b69e0f736f8.tar.xz
glibc-2174c6dd8555f654c30df2f8f3321b69e0f736f8.zip
Avoid -Wconversion warning for htons
Diffstat (limited to 'bits/byteswap-16.h')
-rw-r--r--bits/byteswap-16.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bits/byteswap-16.h b/bits/byteswap-16.h
index 078dd0e17a..6cc1d30932 100644
--- a/bits/byteswap-16.h
+++ b/bits/byteswap-16.h
@@ -23,7 +23,8 @@
 #ifdef __GNUC__
 # define __bswap_16(x) \
     (__extension__							      \
-     ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
+     ({ unsigned short int __bsx = (unsigned short int) (x);		      \
+       __bswap_constant_16 (__bsx); }))
 #else
 static __inline unsigned short int
 __bswap_16 (unsigned short int __bsx)