Skip to content

Commit

Permalink
Fixed some compiler warnings about "unreachable code" on Watcom C.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 3, 2005
1 parent 490defa commit 5f26dc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/video/SDL_RLEaccel.c
Expand Up @@ -1632,10 +1632,11 @@ static Uint32 getpix_16(Uint8 *srcbuf)

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)
Expand Down
3 changes: 2 additions & 1 deletion src/video/SDL_surface.c
Expand Up @@ -712,8 +712,9 @@ int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color)
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 ) {
Expand Down

0 comments on commit 5f26dc3

Please sign in to comment.