Removed variables that current GCC builds warn on as set and never used. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 18 Jan 2012 12:17:16 -0500
branchSDL-1.2
changeset 6227e11fd9609d10
parent 6226 8c0728852b21
child 6228 adbb020cb5a2
Removed variables that current GCC builds warn on as set and never used.
src/audio/SDL_wave.c
src/video/SDL_RLEaccel.c
src/video/SDL_bmp.c
src/video/SDL_stretch.c
src/video/fbcon/SDL_fb3dfx.c
src/video/x11/SDL_x11image.c
     1.1 --- a/src/audio/SDL_wave.c	Wed Jan 18 03:36:47 2012 -0500
     1.2 +++ b/src/audio/SDL_wave.c	Wed Jan 18 12:17:16 2012 -0500
     1.3 @@ -47,7 +47,6 @@
     1.4  static int InitMS_ADPCM(WaveFMT *format)
     1.5  {
     1.6  	Uint8 *rogue_feel;
     1.7 -	Uint16 extra_info;
     1.8  	int i;
     1.9  
    1.10  	/* Set the rogue pointer to the MS_ADPCM specific data */
    1.11 @@ -60,7 +59,6 @@
    1.12  					 SDL_SwapLE16(format->bitspersample);
    1.13  	rogue_feel = (Uint8 *)format+sizeof(*format);
    1.14  	if ( sizeof(*format) == 16 ) {
    1.15 -		extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]);
    1.16  		rogue_feel += sizeof(Uint16);
    1.17  	}
    1.18  	MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
    1.19 @@ -227,7 +225,6 @@
    1.20  static int InitIMA_ADPCM(WaveFMT *format)
    1.21  {
    1.22  	Uint8 *rogue_feel;
    1.23 -	Uint16 extra_info;
    1.24  
    1.25  	/* Set the rogue pointer to the IMA_ADPCM specific data */
    1.26  	IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
    1.27 @@ -239,7 +236,6 @@
    1.28  					 SDL_SwapLE16(format->bitspersample);
    1.29  	rogue_feel = (Uint8 *)format+sizeof(*format);
    1.30  	if ( sizeof(*format) == 16 ) {
    1.31 -		extra_info = ((rogue_feel[1]<<8)|rogue_feel[0]);
    1.32  		rogue_feel += sizeof(Uint16);
    1.33  	}
    1.34  	IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1]<<8)|rogue_feel[0]);
     2.1 --- a/src/video/SDL_RLEaccel.c	Wed Jan 18 03:36:47 2012 -0500
     2.2 +++ b/src/video/SDL_RLEaccel.c	Wed Jan 18 12:17:16 2012 -0500
     2.3 @@ -1645,9 +1645,8 @@
     2.4          Uint8 *rlebuf, *dst;
     2.5  	int maxn;
     2.6  	int y;
     2.7 -	Uint8 *srcbuf, *curbuf, *lastline;
     2.8 +	Uint8 *srcbuf, *lastline;
     2.9  	int maxsize = 0;
    2.10 -	int skip, run;
    2.11  	int bpp = surface->format->BytesPerPixel;
    2.12  	getpix_func getpix;
    2.13  	Uint32 ckey, rgbmask;
    2.14 @@ -1681,9 +1680,7 @@
    2.15  
    2.16  	/* Set up the conversion */
    2.17  	srcbuf = (Uint8 *)surface->pixels;
    2.18 -	curbuf = srcbuf;
    2.19  	maxn = bpp == 4 ? 65535 : 255;
    2.20 -	skip = run = 0;
    2.21  	dst = rlebuf;
    2.22  	rgbmask = ~surface->format->Amask;
    2.23  	ckey = surface->format->colorkey & rgbmask;
     3.1 --- a/src/video/SDL_bmp.c	Wed Jan 18 03:36:47 2012 -0500
     3.2 +++ b/src/video/SDL_bmp.c	Wed Jan 18 12:17:16 2012 -0500
     3.3 @@ -132,6 +132,17 @@
     3.4  		biClrUsed	= SDL_ReadLE32(src);
     3.5  		biClrImportant	= SDL_ReadLE32(src);
     3.6  	}
     3.7 +
     3.8 +	/* stop some compiler warnings. */
     3.9 +	(void) bfSize;
    3.10 +	(void) bfReserved1;
    3.11 +	(void) bfReserved2;
    3.12 +	(void) biPlanes;
    3.13 +	(void) biSizeImage;
    3.14 +	(void) biXPelsPerMeter;
    3.15 +	(void) biYPelsPerMeter;
    3.16 +	(void) biClrImportant;
    3.17 +
    3.18  	if (biHeight < 0) {
    3.19  		topDown = SDL_TRUE;
    3.20  		biHeight = -biHeight;
     4.1 --- a/src/video/SDL_stretch.c	Wed Jan 18 03:36:47 2012 -0500
     4.2 +++ b/src/video/SDL_stretch.c	Wed Jan 18 12:17:16 2012 -0500
     4.3 @@ -205,7 +205,6 @@
     4.4  	int src_locked;
     4.5  	int dst_locked;
     4.6  	int pos, inc;
     4.7 -	int dst_width;
     4.8  	int dst_maxrow;
     4.9  	int src_row, dst_row;
    4.10  	Uint8 *srcp = NULL;
    4.11 @@ -282,7 +281,6 @@
    4.12  	inc = (srcrect->h << 16) / dstrect->h;
    4.13  	src_row = srcrect->y;
    4.14  	dst_row = dstrect->y;
    4.15 -	dst_width = dstrect->w*bpp;
    4.16  
    4.17  #ifdef USE_ASM_STRETCH
    4.18  	/* Write the opcodes for this stretch */
     5.1 --- a/src/video/fbcon/SDL_fb3dfx.c	Wed Jan 18 03:36:47 2012 -0500
     5.2 +++ b/src/video/fbcon/SDL_fb3dfx.c	Wed Jan 18 12:17:16 2012 -0500
     5.3 @@ -96,7 +96,6 @@
     5.4  	SDL_VideoDevice *this = current_video;
     5.5  	int bpp;
     5.6  	Uint32 src_format;
     5.7 -	Uint32 dst_format;
     5.8  	Uint32 src_base;
     5.9  	Uint32 dst_base;
    5.10  	int srcX, srcY;
    5.11 @@ -118,7 +117,6 @@
    5.12  	src_format = src->pitch | ((bpp+((bpp==8) ? 0 : 8)) << 13);
    5.13  	dst_base = ((char *)dst->pixels - mapped_mem);
    5.14  	bpp = dst->format->BitsPerPixel;
    5.15 -	dst_format = dst->pitch | ((bpp+((bpp==8) ? 0 : 8)) << 13);
    5.16  
    5.17  	srcX = srcrect->x;
    5.18  	srcY = srcrect->y;
     6.1 --- a/src/video/x11/SDL_x11image.c	Wed Jan 18 03:36:47 2012 -0500
     6.2 +++ b/src/video/x11/SDL_x11image.c	Wed Jan 18 12:17:16 2012 -0500
     6.3 @@ -102,13 +102,11 @@
     6.4  	if(!use_mitshm)
     6.5  #endif /* not NO_SHARED_MEMORY */
     6.6  	{
     6.7 -		int bpp;
     6.8  		screen->pixels = SDL_malloc(screen->h*screen->pitch);
     6.9  		if ( screen->pixels == NULL ) {
    6.10  			SDL_OutOfMemory();
    6.11  			return -1;
    6.12  		}
    6.13 - 	        bpp = screen->format->BytesPerPixel;
    6.14  		SDL_Ximage = XCreateImage(SDL_Display, SDL_Visual,
    6.15  					  this->hidden->depth, ZPixmap, 0,
    6.16  					  (char *)screen->pixels,