changeset 1155:91569ec25acd

Fixed some compiler warnings about "unreachable code" on Watcom C.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 03 Oct 2005 08:38:28 +0000
parents d93862a3d821
children 8521404a33c7
files src/video/SDL_RLEaccel.c src/video/SDL_surface.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 ) {