Fixed some compiler warnings about "unreachable code" on Watcom C.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 03 Oct 2005 08:38:28 +0000
changeset 1155 91569ec25acd
parent 1154 d93862a3d821
child 1156 8521404a33c7
Fixed some compiler warnings about "unreachable code" on Watcom C.
src/video/SDL_RLEaccel.c
src/video/SDL_surface.c
--- a/src/video/SDL_RLEaccel.c	Mon Oct 03 08:12:32 2005 +0000
+++ b/src/video/SDL_RLEaccel.c	Mon Oct 03 08:38:28 2005 +0000
@@ -1632,10 +1632,11 @@
 
 static Uint32 getpix_24(Uint8 *srcbuf)
 {
-    if(SDL_BYTEORDER == SDL_LIL_ENDIAN)
-	return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
-    else
-	return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+    return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
+#else
+    return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
+#endif
 }
 
 static Uint32 getpix_32(Uint8 *srcbuf)
--- a/src/video/SDL_surface.c	Mon Oct 03 08:12:32 2005 +0000
+++ b/src/video/SDL_surface.c	Mon Oct 03 08:38:28 2005 +0000
@@ -712,8 +712,9 @@
 			break;
 
 		    case 3:
-			if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
+			#if SDL_BYTEORDER == SDL_BIG_ENDIAN
 				color <<= 8;
+			#endif
 			for ( y=dstrect->h; y; --y ) {
 				Uint8 *pixels = row;
 				for ( x=dstrect->w; x; --x ) {