Fixed inline assembly warning for PPC SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Thu, 19 Jan 2012 01:02:03 -0500
branchSDL-1.2
changeset 6234 36b898937520
parent 6233 fdb37a6dc407
child 6238 fba40d9f4a73
Fixed inline assembly warning for PPC
include/SDL_endian.h
--- a/include/SDL_endian.h	Thu Jan 19 00:27:07 2012 -0500
+++ b/include/SDL_endian.h	Thu Jan 19 01:02:03 2012 -0500
@@ -86,10 +86,10 @@
 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
 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(__m68k__) && !defined(__mcoldfire__))
 static __inline__ Uint16 SDL_Swap16(Uint16 x)