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 115591569ec25acd
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
     1.1 --- a/src/video/SDL_RLEaccel.c	Mon Oct 03 08:12:32 2005 +0000
     1.2 +++ b/src/video/SDL_RLEaccel.c	Mon Oct 03 08:38:28 2005 +0000
     1.3 @@ -1632,10 +1632,11 @@
     1.4  
     1.5  static Uint32 getpix_24(Uint8 *srcbuf)
     1.6  {
     1.7 -    if(SDL_BYTEORDER == SDL_LIL_ENDIAN)
     1.8 -	return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
     1.9 -    else
    1.10 -	return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
    1.11 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.12 +    return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);
    1.13 +#else
    1.14 +    return (srcbuf[0] << 16) + (srcbuf[1] << 8) + srcbuf[2];
    1.15 +#endif
    1.16  }
    1.17  
    1.18  static Uint32 getpix_32(Uint8 *srcbuf)
     2.1 --- a/src/video/SDL_surface.c	Mon Oct 03 08:12:32 2005 +0000
     2.2 +++ b/src/video/SDL_surface.c	Mon Oct 03 08:38:28 2005 +0000
     2.3 @@ -712,8 +712,9 @@
     2.4  			break;
     2.5  
     2.6  		    case 3:
     2.7 -			if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
     2.8 +			#if SDL_BYTEORDER == SDL_BIG_ENDIAN
     2.9  				color <<= 8;
    2.10 +			#endif
    2.11  			for ( y=dstrect->h; y; --y ) {
    2.12  				Uint8 *pixels = row;
    2.13  				for ( x=dstrect->w; x; --x ) {