Fixed inline assembly warning for PPC
authorSam Lantinga <slouken@libsdl.org>
Sat, 14 Jan 2012 00:49:25 -0500
changeset 6213 e50324ad38ee
parent 6212 78d854de3a66
child 6214 b1a71f8189a6
Fixed inline assembly warning for PPC input constraint with a matching output constraint of incompatible type
include/SDL_endian.h
--- a/include/SDL_endian.h	Fri Jan 13 20:57:35 2012 -0500
+++ b/include/SDL_endian.h	Sat Jan 14 00:49:25 2012 -0500
@@ -91,10 +91,10 @@
 static __inline__ Uint16
 SDL_Swap16(Uint16 x)
 {
-    Uint16 result;
+    int result;
 
   __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
-    return result;
+    return (Uint16)result;
 }
 #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
 static __inline__ Uint16