Blame SOURCES/glibc-rh750531.patch

4999bf
commit 69da074d7adfab7b57004a0dea9403a928e310a5
4999bf
Author: Ulrich Drepper <drepper@gmail.com>
4999bf
Date:   Wed Nov 10 02:38:35 2010 -0500
4999bf
4999bf
    Fix warnings in __bswap_16.
4999bf
4999bf
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h
4999bf
index 1f3fc5e..c246ae8 100644
4999bf
--- a/sysdeps/i386/bits/byteswap.h
4999bf
+++ b/sysdeps/i386/bits/byteswap.h
4999bf
@@ -1,5 +1,5 @@
4999bf
 /* Macros to swap the order of bytes in integer values.
4999bf
-   Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008
4999bf
+   Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010
4999bf
    Free Software Foundation, Inc.
4999bf
    This file is part of the GNU C Library.
4999bf
 
4999bf
@@ -27,26 +27,27 @@
4999bf
 
4999bf
 /* Swap bytes in 16 bit value.  */
4999bf
 #define __bswap_constant_16(x) \
4999bf
-     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
4999bf
+     ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
4999bf
 
4999bf
 #ifdef __GNUC__
4999bf
 # if __GNUC__ >= 2
4999bf
 #  define __bswap_16(x) \
4999bf
      (__extension__							      \
4999bf
-      ({ register unsigned short int __v, __x = (x);			      \
4999bf
+      ({ register unsigned short int __v, __x = (unsigned short int) (x);     \
4999bf
 	 if (__builtin_constant_p (__x))				      \
4999bf
 	   __v = __bswap_constant_16 (__x);				      \
4999bf
 	 else								      \
4999bf
 	   __asm__ ("rorw $8, %w0"					      \
4999bf
 		    : "=r" (__v)					      \
4999bf
- 		    : "0" (__x)						      \
4999bf
- 		    : "cc");						      \
4999bf
+		    : "0" (__x)						      \
4999bf
+		    : "cc");						      \
4999bf
 	 __v; }))
4999bf
 # else
4999bf
 /* This is better than nothing.  */
4999bf
 #  define __bswap_16(x) \
4999bf
      (__extension__							      \
4999bf
-      ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
4999bf
+      ({ register unsigned short int __x = (unsigned short int) (x);	      \
4999bf
+	 __bswap_constant_16 (__x); }))
4999bf
 # endif
4999bf
 #else
4999bf
 static __inline unsigned short int
4999bf
@@ -122,7 +123,7 @@ __bswap_32 (unsigned int __bsx)
4999bf
      (__extension__							      \
4999bf
       ({ union { __extension__ unsigned long long int __ll;		      \
4999bf
 		 unsigned long int __l[2]; } __w, __r;			      \
4999bf
-         if (__builtin_constant_p (x))					      \
4999bf
+	 if (__builtin_constant_p (x))					      \
4999bf
 	   __r.__ll = __bswap_constant_64 (x);				      \
4999bf
 	 else								      \
4999bf
 	   {								      \
4999bf
diff --git a/sysdeps/x86_64/bits/byteswap.h b/sysdeps/x86_64/bits/byteswap.h
4999bf
index 08b38e8..e350fb8 100644
4999bf
--- a/sysdeps/x86_64/bits/byteswap.h
4999bf
+++ b/sysdeps/x86_64/bits/byteswap.h
4999bf
@@ -1,5 +1,5 @@
4999bf
 /* Macros to swap the order of bytes in integer values.
4999bf
-   Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008
4999bf
+   Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010
4999bf
    Free Software Foundation, Inc.
4999bf
    This file is part of the GNU C Library.
4999bf
 
4999bf
@@ -29,12 +29,12 @@
4999bf
 
4999bf
 /* Swap bytes in 16 bit value.  */
4999bf
 #define __bswap_constant_16(x) \
4999bf
-     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
4999bf
+     ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
4999bf
 
4999bf
 #if defined __GNUC__ && __GNUC__ >= 2
4999bf
 # define __bswap_16(x) \
4999bf
      (__extension__							      \
4999bf
-      ({ register unsigned short int __v, __x = (x);			      \
4999bf
+      ({ register unsigned short int __v, __x = (unsigned short int) (x);     \
4999bf
 	 if (__builtin_constant_p (__x))				      \
4999bf
 	   __v = __bswap_constant_16 (__x);				      \
4999bf
 	 else								      \
4999bf
@@ -47,7 +47,8 @@
4999bf
 /* This is better than nothing.  */
4999bf
 # define __bswap_16(x) \
4999bf
      (__extension__							      \
4999bf
-      ({ register unsigned short int __x = (x); __bswap_constant_16 (__x); }))
4999bf
+      ({ register unsigned short int __x = (unsigned short int) (x);          \
4999bf
+	 __bswap_constant_16 (__x); }))
4999bf
 #endif
4999bf
 
4999bf
 
4999bf
@@ -120,16 +121,16 @@
4999bf
 #  define __bswap_64(x) \
4999bf
      (__extension__                                                           \
4999bf
       ({ union { __extension__ unsigned long long int __ll;                   \
4999bf
-                 unsigned int __l[2]; } __w, __r;                             \
4999bf
-         if (__builtin_constant_p (x))                                        \
4999bf
-           __r.__ll = __bswap_constant_64 (x);                                \
4999bf
-         else                                                                 \
4999bf
-           {                                                                  \
4999bf
-             __w.__ll = (x);                                                  \
4999bf
-             __r.__l[0] = __bswap_32 (__w.__l[1]);                            \
4999bf
-             __r.__l[1] = __bswap_32 (__w.__l[0]);                            \
4999bf
-           }                                                                  \
4999bf
-         __r.__ll; }))
4999bf
+		 unsigned int __l[2]; } __w, __r;                             \
4999bf
+	 if (__builtin_constant_p (x))                                        \
4999bf
+	   __r.__ll = __bswap_constant_64 (x);                                \
4999bf
+	 else                                                                 \
4999bf
+	   {                                                                  \
4999bf
+	     __w.__ll = (x);                                                  \
4999bf
+	     __r.__l[0] = __bswap_32 (__w.__l[1]);                            \
4999bf
+	     __r.__l[1] = __bswap_32 (__w.__l[0]);                            \
4999bf
+	   }                                                                  \
4999bf
+	 __r.__ll; }))
4999bf
 # endif
4999bf
 #endif
4999bf