Fixed compiler warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 06 Mar 2011 21:17:09 -0800
changeset 54267a3982c50af8
parent 5425 346f095568ab
child 5427 d9b4fd6fcdc4
Fixed compiler warnings
src/video/SDL_blit.h
src/video/SDL_blit_auto.c
src/video/SDL_blit_slow.c
src/video/sdlgenblit.pl
     1.1 --- a/src/video/SDL_blit.h	Sun Mar 06 21:15:46 2011 -0800
     1.2 +++ b/src/video/SDL_blit.h	Sun Mar 06 21:17:09 2011 -0800
     1.3 @@ -172,7 +172,7 @@
     1.4  		break;							   \
     1.5  									   \
     1.6  		default:						   \
     1.7 -		        Pixel; /* stop gcc complaints */		   \
     1.8 +		        Pixel = 0; /* stop gcc complaints */		   \
     1.9  		break;							   \
    1.10  	}								   \
    1.11  } while (0)
    1.12 @@ -186,6 +186,7 @@
    1.13  		break;							   \
    1.14  									   \
    1.15  		case 3:	{						   \
    1.16 +            Pixel = 0;                  \
    1.17                          if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {		   \
    1.18  			        r = *((buf)+fmt->Rshift/8);		   \
    1.19  				g = *((buf)+fmt->Gshift/8);		   \
    1.20 @@ -204,7 +205,9 @@
    1.21  		break;							   \
    1.22  									   \
    1.23  		default:						   \
    1.24 -		        Pixel; /* stop gcc complaints */		   \
    1.25 +                /* stop gcc complaints */		   \
    1.26 +		        Pixel = 0;              \
    1.27 +                r = g = b = 0;          \
    1.28  		break;							   \
    1.29  	}								   \
    1.30  } while (0)
    1.31 @@ -277,43 +280,6 @@
    1.32  		break;							\
    1.33  	}								\
    1.34  }
    1.35 -#define ASSEMBLE_RGB_AMASK(buf, bpp, fmt, r, g, b, Amask)		\
    1.36 -{									\
    1.37 -	switch (bpp) {							\
    1.38 -		case 2: {						\
    1.39 -			Uint16 *bufp;					\
    1.40 -			Uint16 Pixel;					\
    1.41 -									\
    1.42 -			bufp = (Uint16 *)buf;				\
    1.43 -			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
    1.44 -			*bufp = Pixel | (*bufp & Amask);		\
    1.45 -		}							\
    1.46 -		break;							\
    1.47 -									\
    1.48 -		case 3: {						\
    1.49 -                        if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {		\
    1.50 -			        *((buf)+fmt->Rshift/8) = r;		\
    1.51 -				*((buf)+fmt->Gshift/8) = g;		\
    1.52 -				*((buf)+fmt->Bshift/8) = b;		\
    1.53 -			} else {					\
    1.54 -			        *((buf)+2-fmt->Rshift/8) = r;		\
    1.55 -				*((buf)+2-fmt->Gshift/8) = g;		\
    1.56 -				*((buf)+2-fmt->Bshift/8) = b;		\
    1.57 -			}						\
    1.58 -		}							\
    1.59 -		break;							\
    1.60 -									\
    1.61 -		case 4: {						\
    1.62 -			Uint32 *bufp;					\
    1.63 -			Uint32 Pixel;					\
    1.64 -									\
    1.65 -			bufp = (Uint32 *)buf;				\
    1.66 -			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
    1.67 -			*bufp = Pixel | (*bufp & Amask);		\
    1.68 -		}							\
    1.69 -		break;							\
    1.70 -	}								\
    1.71 -}
    1.72  
    1.73  /* FIXME: Should we rescale alpha into 0..255 here? */
    1.74  #define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)				\
    1.75 @@ -367,6 +333,7 @@
    1.76  		break;							   \
    1.77  									   \
    1.78  		case 3:	{						   \
    1.79 +            Pixel = 0; \
    1.80                          if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {		   \
    1.81  			        r = *((buf)+fmt->Rshift/8);		   \
    1.82  				g = *((buf)+fmt->Gshift/8);		   \
    1.83 @@ -386,7 +353,9 @@
    1.84  		break;							   \
    1.85  									   \
    1.86  		default:						   \
    1.87 -		        Pixel; /* stop gcc complaints */		   \
    1.88 +                /* stop gcc complaints */		   \
    1.89 +		        Pixel = 0;              \
    1.90 +                r = g = b = a = 0;      \
    1.91  		break;							   \
    1.92  	}								   \
    1.93  } while (0)
     2.1 --- a/src/video/SDL_blit_auto.c	Sun Mar 06 21:15:46 2011 -0800
     2.2 +++ b/src/video/SDL_blit_auto.c	Sun Mar 06 21:17:09 2011 -0800
     2.3 @@ -30,7 +30,6 @@
     2.4  
     2.5  static void SDL_Blit_RGB888_RGB888_Scale(SDL_BlitInfo *info)
     2.6  {
     2.7 -    const int flags = info->flags;
     2.8      int srcy, srcx;
     2.9      int posy, posx;
    2.10      int incy, incx;
    2.11 @@ -41,7 +40,7 @@
    2.12      incx = (info->src_w << 16) / info->dst_w;
    2.13  
    2.14      while (info->dst_h--) {
    2.15 -        Uint32 *src;
    2.16 +        Uint32 *src = 0;
    2.17          Uint32 *dst = (Uint32 *)info->dst;
    2.18          int n = info->dst_w;
    2.19          srcx = -1;
    2.20 @@ -136,7 +135,7 @@
    2.21      incx = (info->src_w << 16) / info->dst_w;
    2.22  
    2.23      while (info->dst_h--) {
    2.24 -        Uint32 *src;
    2.25 +        Uint32 *src = 0;
    2.26          Uint32 *dst = (Uint32 *)info->dst;
    2.27          int n = info->dst_w;
    2.28          srcx = -1;
    2.29 @@ -246,7 +245,7 @@
    2.30      incx = (info->src_w << 16) / info->dst_w;
    2.31  
    2.32      while (info->dst_h--) {
    2.33 -        Uint32 *src;
    2.34 +        Uint32 *src = 0;
    2.35          Uint32 *dst = (Uint32 *)info->dst;
    2.36          int n = info->dst_w;
    2.37          srcx = -1;
    2.38 @@ -368,7 +367,7 @@
    2.39      incx = (info->src_w << 16) / info->dst_w;
    2.40  
    2.41      while (info->dst_h--) {
    2.42 -        Uint32 *src;
    2.43 +        Uint32 *src = 0;
    2.44          Uint32 *dst = (Uint32 *)info->dst;
    2.45          int n = info->dst_w;
    2.46          srcx = -1;
    2.47 @@ -434,7 +433,6 @@
    2.48  
    2.49  static void SDL_Blit_RGB888_BGR888_Scale(SDL_BlitInfo *info)
    2.50  {
    2.51 -    const int flags = info->flags;
    2.52      Uint32 pixel;
    2.53      Uint32 R, G, B, A;
    2.54      int srcy, srcx;
    2.55 @@ -447,7 +445,7 @@
    2.56      incx = (info->src_w << 16) / info->dst_w;
    2.57  
    2.58      while (info->dst_h--) {
    2.59 -        Uint32 *src;
    2.60 +        Uint32 *src = 0;
    2.61          Uint32 *dst = (Uint32 *)info->dst;
    2.62          int n = info->dst_w;
    2.63          srcx = -1;
    2.64 @@ -545,7 +543,7 @@
    2.65      incx = (info->src_w << 16) / info->dst_w;
    2.66  
    2.67      while (info->dst_h--) {
    2.68 -        Uint32 *src;
    2.69 +        Uint32 *src = 0;
    2.70          Uint32 *dst = (Uint32 *)info->dst;
    2.71          int n = info->dst_w;
    2.72          srcx = -1;
    2.73 @@ -655,7 +653,7 @@
    2.74      incx = (info->src_w << 16) / info->dst_w;
    2.75  
    2.76      while (info->dst_h--) {
    2.77 -        Uint32 *src;
    2.78 +        Uint32 *src = 0;
    2.79          Uint32 *dst = (Uint32 *)info->dst;
    2.80          int n = info->dst_w;
    2.81          srcx = -1;
    2.82 @@ -777,7 +775,7 @@
    2.83      incx = (info->src_w << 16) / info->dst_w;
    2.84  
    2.85      while (info->dst_h--) {
    2.86 -        Uint32 *src;
    2.87 +        Uint32 *src = 0;
    2.88          Uint32 *dst = (Uint32 *)info->dst;
    2.89          int n = info->dst_w;
    2.90          srcx = -1;
    2.91 @@ -843,7 +841,6 @@
    2.92  
    2.93  static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info)
    2.94  {
    2.95 -    const int flags = info->flags;
    2.96      Uint32 pixel;
    2.97      Uint32 R, G, B, A;
    2.98      int srcy, srcx;
    2.99 @@ -856,7 +853,7 @@
   2.100      incx = (info->src_w << 16) / info->dst_w;
   2.101  
   2.102      while (info->dst_h--) {
   2.103 -        Uint32 *src;
   2.104 +        Uint32 *src = 0;
   2.105          Uint32 *dst = (Uint32 *)info->dst;
   2.106          int n = info->dst_w;
   2.107          srcx = -1;
   2.108 @@ -954,7 +951,7 @@
   2.109      incx = (info->src_w << 16) / info->dst_w;
   2.110  
   2.111      while (info->dst_h--) {
   2.112 -        Uint32 *src;
   2.113 +        Uint32 *src = 0;
   2.114          Uint32 *dst = (Uint32 *)info->dst;
   2.115          int n = info->dst_w;
   2.116          srcx = -1;
   2.117 @@ -1064,7 +1061,7 @@
   2.118      incx = (info->src_w << 16) / info->dst_w;
   2.119  
   2.120      while (info->dst_h--) {
   2.121 -        Uint32 *src;
   2.122 +        Uint32 *src = 0;
   2.123          Uint32 *dst = (Uint32 *)info->dst;
   2.124          int n = info->dst_w;
   2.125          srcx = -1;
   2.126 @@ -1186,7 +1183,7 @@
   2.127      incx = (info->src_w << 16) / info->dst_w;
   2.128  
   2.129      while (info->dst_h--) {
   2.130 -        Uint32 *src;
   2.131 +        Uint32 *src = 0;
   2.132          Uint32 *dst = (Uint32 *)info->dst;
   2.133          int n = info->dst_w;
   2.134          srcx = -1;
   2.135 @@ -1252,7 +1249,6 @@
   2.136  
   2.137  static void SDL_Blit_BGR888_RGB888_Scale(SDL_BlitInfo *info)
   2.138  {
   2.139 -    const int flags = info->flags;
   2.140      Uint32 pixel;
   2.141      Uint32 R, G, B, A;
   2.142      int srcy, srcx;
   2.143 @@ -1265,7 +1261,7 @@
   2.144      incx = (info->src_w << 16) / info->dst_w;
   2.145  
   2.146      while (info->dst_h--) {
   2.147 -        Uint32 *src;
   2.148 +        Uint32 *src = 0;
   2.149          Uint32 *dst = (Uint32 *)info->dst;
   2.150          int n = info->dst_w;
   2.151          srcx = -1;
   2.152 @@ -1363,7 +1359,7 @@
   2.153      incx = (info->src_w << 16) / info->dst_w;
   2.154  
   2.155      while (info->dst_h--) {
   2.156 -        Uint32 *src;
   2.157 +        Uint32 *src = 0;
   2.158          Uint32 *dst = (Uint32 *)info->dst;
   2.159          int n = info->dst_w;
   2.160          srcx = -1;
   2.161 @@ -1473,7 +1469,7 @@
   2.162      incx = (info->src_w << 16) / info->dst_w;
   2.163  
   2.164      while (info->dst_h--) {
   2.165 -        Uint32 *src;
   2.166 +        Uint32 *src = 0;
   2.167          Uint32 *dst = (Uint32 *)info->dst;
   2.168          int n = info->dst_w;
   2.169          srcx = -1;
   2.170 @@ -1595,7 +1591,7 @@
   2.171      incx = (info->src_w << 16) / info->dst_w;
   2.172  
   2.173      while (info->dst_h--) {
   2.174 -        Uint32 *src;
   2.175 +        Uint32 *src = 0;
   2.176          Uint32 *dst = (Uint32 *)info->dst;
   2.177          int n = info->dst_w;
   2.178          srcx = -1;
   2.179 @@ -1661,7 +1657,6 @@
   2.180  
   2.181  static void SDL_Blit_BGR888_BGR888_Scale(SDL_BlitInfo *info)
   2.182  {
   2.183 -    const int flags = info->flags;
   2.184      int srcy, srcx;
   2.185      int posy, posx;
   2.186      int incy, incx;
   2.187 @@ -1672,7 +1667,7 @@
   2.188      incx = (info->src_w << 16) / info->dst_w;
   2.189  
   2.190      while (info->dst_h--) {
   2.191 -        Uint32 *src;
   2.192 +        Uint32 *src = 0;
   2.193          Uint32 *dst = (Uint32 *)info->dst;
   2.194          int n = info->dst_w;
   2.195          srcx = -1;
   2.196 @@ -1767,7 +1762,7 @@
   2.197      incx = (info->src_w << 16) / info->dst_w;
   2.198  
   2.199      while (info->dst_h--) {
   2.200 -        Uint32 *src;
   2.201 +        Uint32 *src = 0;
   2.202          Uint32 *dst = (Uint32 *)info->dst;
   2.203          int n = info->dst_w;
   2.204          srcx = -1;
   2.205 @@ -1877,7 +1872,7 @@
   2.206      incx = (info->src_w << 16) / info->dst_w;
   2.207  
   2.208      while (info->dst_h--) {
   2.209 -        Uint32 *src;
   2.210 +        Uint32 *src = 0;
   2.211          Uint32 *dst = (Uint32 *)info->dst;
   2.212          int n = info->dst_w;
   2.213          srcx = -1;
   2.214 @@ -1999,7 +1994,7 @@
   2.215      incx = (info->src_w << 16) / info->dst_w;
   2.216  
   2.217      while (info->dst_h--) {
   2.218 -        Uint32 *src;
   2.219 +        Uint32 *src = 0;
   2.220          Uint32 *dst = (Uint32 *)info->dst;
   2.221          int n = info->dst_w;
   2.222          srcx = -1;
   2.223 @@ -2065,7 +2060,6 @@
   2.224  
   2.225  static void SDL_Blit_BGR888_ARGB8888_Scale(SDL_BlitInfo *info)
   2.226  {
   2.227 -    const int flags = info->flags;
   2.228      Uint32 pixel;
   2.229      Uint32 R, G, B, A;
   2.230      int srcy, srcx;
   2.231 @@ -2078,7 +2072,7 @@
   2.232      incx = (info->src_w << 16) / info->dst_w;
   2.233  
   2.234      while (info->dst_h--) {
   2.235 -        Uint32 *src;
   2.236 +        Uint32 *src = 0;
   2.237          Uint32 *dst = (Uint32 *)info->dst;
   2.238          int n = info->dst_w;
   2.239          srcx = -1;
   2.240 @@ -2176,7 +2170,7 @@
   2.241      incx = (info->src_w << 16) / info->dst_w;
   2.242  
   2.243      while (info->dst_h--) {
   2.244 -        Uint32 *src;
   2.245 +        Uint32 *src = 0;
   2.246          Uint32 *dst = (Uint32 *)info->dst;
   2.247          int n = info->dst_w;
   2.248          srcx = -1;
   2.249 @@ -2286,7 +2280,7 @@
   2.250      incx = (info->src_w << 16) / info->dst_w;
   2.251  
   2.252      while (info->dst_h--) {
   2.253 -        Uint32 *src;
   2.254 +        Uint32 *src = 0;
   2.255          Uint32 *dst = (Uint32 *)info->dst;
   2.256          int n = info->dst_w;
   2.257          srcx = -1;
   2.258 @@ -2408,7 +2402,7 @@
   2.259      incx = (info->src_w << 16) / info->dst_w;
   2.260  
   2.261      while (info->dst_h--) {
   2.262 -        Uint32 *src;
   2.263 +        Uint32 *src = 0;
   2.264          Uint32 *dst = (Uint32 *)info->dst;
   2.265          int n = info->dst_w;
   2.266          srcx = -1;
   2.267 @@ -2474,7 +2468,6 @@
   2.268  
   2.269  static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info)
   2.270  {
   2.271 -    const int flags = info->flags;
   2.272      Uint32 pixel;
   2.273      Uint32 R, G, B, A;
   2.274      int srcy, srcx;
   2.275 @@ -2487,7 +2480,7 @@
   2.276      incx = (info->src_w << 16) / info->dst_w;
   2.277  
   2.278      while (info->dst_h--) {
   2.279 -        Uint32 *src;
   2.280 +        Uint32 *src = 0;
   2.281          Uint32 *dst = (Uint32 *)info->dst;
   2.282          int n = info->dst_w;
   2.283          srcx = -1;
   2.284 @@ -2585,7 +2578,7 @@
   2.285      incx = (info->src_w << 16) / info->dst_w;
   2.286  
   2.287      while (info->dst_h--) {
   2.288 -        Uint32 *src;
   2.289 +        Uint32 *src = 0;
   2.290          Uint32 *dst = (Uint32 *)info->dst;
   2.291          int n = info->dst_w;
   2.292          srcx = -1;
   2.293 @@ -2695,7 +2688,7 @@
   2.294      incx = (info->src_w << 16) / info->dst_w;
   2.295  
   2.296      while (info->dst_h--) {
   2.297 -        Uint32 *src;
   2.298 +        Uint32 *src = 0;
   2.299          Uint32 *dst = (Uint32 *)info->dst;
   2.300          int n = info->dst_w;
   2.301          srcx = -1;
   2.302 @@ -2817,7 +2810,7 @@
   2.303      incx = (info->src_w << 16) / info->dst_w;
   2.304  
   2.305      while (info->dst_h--) {
   2.306 -        Uint32 *src;
   2.307 +        Uint32 *src = 0;
   2.308          Uint32 *dst = (Uint32 *)info->dst;
   2.309          int n = info->dst_w;
   2.310          srcx = -1;
   2.311 @@ -2883,7 +2876,6 @@
   2.312  
   2.313  static void SDL_Blit_ARGB8888_BGR888_Scale(SDL_BlitInfo *info)
   2.314  {
   2.315 -    const int flags = info->flags;
   2.316      Uint32 pixel;
   2.317      Uint32 R, G, B, A;
   2.318      int srcy, srcx;
   2.319 @@ -2896,7 +2888,7 @@
   2.320      incx = (info->src_w << 16) / info->dst_w;
   2.321  
   2.322      while (info->dst_h--) {
   2.323 -        Uint32 *src;
   2.324 +        Uint32 *src = 0;
   2.325          Uint32 *dst = (Uint32 *)info->dst;
   2.326          int n = info->dst_w;
   2.327          srcx = -1;
   2.328 @@ -2994,7 +2986,7 @@
   2.329      incx = (info->src_w << 16) / info->dst_w;
   2.330  
   2.331      while (info->dst_h--) {
   2.332 -        Uint32 *src;
   2.333 +        Uint32 *src = 0;
   2.334          Uint32 *dst = (Uint32 *)info->dst;
   2.335          int n = info->dst_w;
   2.336          srcx = -1;
   2.337 @@ -3104,7 +3096,7 @@
   2.338      incx = (info->src_w << 16) / info->dst_w;
   2.339  
   2.340      while (info->dst_h--) {
   2.341 -        Uint32 *src;
   2.342 +        Uint32 *src = 0;
   2.343          Uint32 *dst = (Uint32 *)info->dst;
   2.344          int n = info->dst_w;
   2.345          srcx = -1;
   2.346 @@ -3226,7 +3218,7 @@
   2.347      incx = (info->src_w << 16) / info->dst_w;
   2.348  
   2.349      while (info->dst_h--) {
   2.350 -        Uint32 *src;
   2.351 +        Uint32 *src = 0;
   2.352          Uint32 *dst = (Uint32 *)info->dst;
   2.353          int n = info->dst_w;
   2.354          srcx = -1;
   2.355 @@ -3292,7 +3284,6 @@
   2.356  
   2.357  static void SDL_Blit_ARGB8888_ARGB8888_Scale(SDL_BlitInfo *info)
   2.358  {
   2.359 -    const int flags = info->flags;
   2.360      int srcy, srcx;
   2.361      int posy, posx;
   2.362      int incy, incx;
   2.363 @@ -3303,7 +3294,7 @@
   2.364      incx = (info->src_w << 16) / info->dst_w;
   2.365  
   2.366      while (info->dst_h--) {
   2.367 -        Uint32 *src;
   2.368 +        Uint32 *src = 0;
   2.369          Uint32 *dst = (Uint32 *)info->dst;
   2.370          int n = info->dst_w;
   2.371          srcx = -1;
   2.372 @@ -3398,7 +3389,7 @@
   2.373      incx = (info->src_w << 16) / info->dst_w;
   2.374  
   2.375      while (info->dst_h--) {
   2.376 -        Uint32 *src;
   2.377 +        Uint32 *src = 0;
   2.378          Uint32 *dst = (Uint32 *)info->dst;
   2.379          int n = info->dst_w;
   2.380          srcx = -1;
   2.381 @@ -3508,7 +3499,7 @@
   2.382      incx = (info->src_w << 16) / info->dst_w;
   2.383  
   2.384      while (info->dst_h--) {
   2.385 -        Uint32 *src;
   2.386 +        Uint32 *src = 0;
   2.387          Uint32 *dst = (Uint32 *)info->dst;
   2.388          int n = info->dst_w;
   2.389          srcx = -1;
   2.390 @@ -3630,7 +3621,7 @@
   2.391      incx = (info->src_w << 16) / info->dst_w;
   2.392  
   2.393      while (info->dst_h--) {
   2.394 -        Uint32 *src;
   2.395 +        Uint32 *src = 0;
   2.396          Uint32 *dst = (Uint32 *)info->dst;
   2.397          int n = info->dst_w;
   2.398          srcx = -1;
   2.399 @@ -3696,7 +3687,6 @@
   2.400  
   2.401  static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info)
   2.402  {
   2.403 -    const int flags = info->flags;
   2.404      Uint32 pixel;
   2.405      Uint32 R, G, B, A;
   2.406      int srcy, srcx;
   2.407 @@ -3709,7 +3699,7 @@
   2.408      incx = (info->src_w << 16) / info->dst_w;
   2.409  
   2.410      while (info->dst_h--) {
   2.411 -        Uint32 *src;
   2.412 +        Uint32 *src = 0;
   2.413          Uint32 *dst = (Uint32 *)info->dst;
   2.414          int n = info->dst_w;
   2.415          srcx = -1;
   2.416 @@ -3807,7 +3797,7 @@
   2.417      incx = (info->src_w << 16) / info->dst_w;
   2.418  
   2.419      while (info->dst_h--) {
   2.420 -        Uint32 *src;
   2.421 +        Uint32 *src = 0;
   2.422          Uint32 *dst = (Uint32 *)info->dst;
   2.423          int n = info->dst_w;
   2.424          srcx = -1;
   2.425 @@ -3917,7 +3907,7 @@
   2.426      incx = (info->src_w << 16) / info->dst_w;
   2.427  
   2.428      while (info->dst_h--) {
   2.429 -        Uint32 *src;
   2.430 +        Uint32 *src = 0;
   2.431          Uint32 *dst = (Uint32 *)info->dst;
   2.432          int n = info->dst_w;
   2.433          srcx = -1;
   2.434 @@ -4039,7 +4029,7 @@
   2.435      incx = (info->src_w << 16) / info->dst_w;
   2.436  
   2.437      while (info->dst_h--) {
   2.438 -        Uint32 *src;
   2.439 +        Uint32 *src = 0;
   2.440          Uint32 *dst = (Uint32 *)info->dst;
   2.441          int n = info->dst_w;
   2.442          srcx = -1;
   2.443 @@ -4105,7 +4095,6 @@
   2.444  
   2.445  static void SDL_Blit_RGBA8888_BGR888_Scale(SDL_BlitInfo *info)
   2.446  {
   2.447 -    const int flags = info->flags;
   2.448      Uint32 pixel;
   2.449      Uint32 R, G, B, A;
   2.450      int srcy, srcx;
   2.451 @@ -4118,7 +4107,7 @@
   2.452      incx = (info->src_w << 16) / info->dst_w;
   2.453  
   2.454      while (info->dst_h--) {
   2.455 -        Uint32 *src;
   2.456 +        Uint32 *src = 0;
   2.457          Uint32 *dst = (Uint32 *)info->dst;
   2.458          int n = info->dst_w;
   2.459          srcx = -1;
   2.460 @@ -4216,7 +4205,7 @@
   2.461      incx = (info->src_w << 16) / info->dst_w;
   2.462  
   2.463      while (info->dst_h--) {
   2.464 -        Uint32 *src;
   2.465 +        Uint32 *src = 0;
   2.466          Uint32 *dst = (Uint32 *)info->dst;
   2.467          int n = info->dst_w;
   2.468          srcx = -1;
   2.469 @@ -4326,7 +4315,7 @@
   2.470      incx = (info->src_w << 16) / info->dst_w;
   2.471  
   2.472      while (info->dst_h--) {
   2.473 -        Uint32 *src;
   2.474 +        Uint32 *src = 0;
   2.475          Uint32 *dst = (Uint32 *)info->dst;
   2.476          int n = info->dst_w;
   2.477          srcx = -1;
   2.478 @@ -4448,7 +4437,7 @@
   2.479      incx = (info->src_w << 16) / info->dst_w;
   2.480  
   2.481      while (info->dst_h--) {
   2.482 -        Uint32 *src;
   2.483 +        Uint32 *src = 0;
   2.484          Uint32 *dst = (Uint32 *)info->dst;
   2.485          int n = info->dst_w;
   2.486          srcx = -1;
   2.487 @@ -4514,7 +4503,6 @@
   2.488  
   2.489  static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info)
   2.490  {
   2.491 -    const int flags = info->flags;
   2.492      Uint32 pixel;
   2.493      Uint32 R, G, B, A;
   2.494      int srcy, srcx;
   2.495 @@ -4527,7 +4515,7 @@
   2.496      incx = (info->src_w << 16) / info->dst_w;
   2.497  
   2.498      while (info->dst_h--) {
   2.499 -        Uint32 *src;
   2.500 +        Uint32 *src = 0;
   2.501          Uint32 *dst = (Uint32 *)info->dst;
   2.502          int n = info->dst_w;
   2.503          srcx = -1;
   2.504 @@ -4625,7 +4613,7 @@
   2.505      incx = (info->src_w << 16) / info->dst_w;
   2.506  
   2.507      while (info->dst_h--) {
   2.508 -        Uint32 *src;
   2.509 +        Uint32 *src = 0;
   2.510          Uint32 *dst = (Uint32 *)info->dst;
   2.511          int n = info->dst_w;
   2.512          srcx = -1;
   2.513 @@ -4735,7 +4723,7 @@
   2.514      incx = (info->src_w << 16) / info->dst_w;
   2.515  
   2.516      while (info->dst_h--) {
   2.517 -        Uint32 *src;
   2.518 +        Uint32 *src = 0;
   2.519          Uint32 *dst = (Uint32 *)info->dst;
   2.520          int n = info->dst_w;
   2.521          srcx = -1;
   2.522 @@ -4857,7 +4845,7 @@
   2.523      incx = (info->src_w << 16) / info->dst_w;
   2.524  
   2.525      while (info->dst_h--) {
   2.526 -        Uint32 *src;
   2.527 +        Uint32 *src = 0;
   2.528          Uint32 *dst = (Uint32 *)info->dst;
   2.529          int n = info->dst_w;
   2.530          srcx = -1;
   2.531 @@ -4923,7 +4911,6 @@
   2.532  
   2.533  static void SDL_Blit_ABGR8888_RGB888_Scale(SDL_BlitInfo *info)
   2.534  {
   2.535 -    const int flags = info->flags;
   2.536      Uint32 pixel;
   2.537      Uint32 R, G, B, A;
   2.538      int srcy, srcx;
   2.539 @@ -4936,7 +4923,7 @@
   2.540      incx = (info->src_w << 16) / info->dst_w;
   2.541  
   2.542      while (info->dst_h--) {
   2.543 -        Uint32 *src;
   2.544 +        Uint32 *src = 0;
   2.545          Uint32 *dst = (Uint32 *)info->dst;
   2.546          int n = info->dst_w;
   2.547          srcx = -1;
   2.548 @@ -5034,7 +5021,7 @@
   2.549      incx = (info->src_w << 16) / info->dst_w;
   2.550  
   2.551      while (info->dst_h--) {
   2.552 -        Uint32 *src;
   2.553 +        Uint32 *src = 0;
   2.554          Uint32 *dst = (Uint32 *)info->dst;
   2.555          int n = info->dst_w;
   2.556          srcx = -1;
   2.557 @@ -5144,7 +5131,7 @@
   2.558      incx = (info->src_w << 16) / info->dst_w;
   2.559  
   2.560      while (info->dst_h--) {
   2.561 -        Uint32 *src;
   2.562 +        Uint32 *src = 0;
   2.563          Uint32 *dst = (Uint32 *)info->dst;
   2.564          int n = info->dst_w;
   2.565          srcx = -1;
   2.566 @@ -5266,7 +5253,7 @@
   2.567      incx = (info->src_w << 16) / info->dst_w;
   2.568  
   2.569      while (info->dst_h--) {
   2.570 -        Uint32 *src;
   2.571 +        Uint32 *src = 0;
   2.572          Uint32 *dst = (Uint32 *)info->dst;
   2.573          int n = info->dst_w;
   2.574          srcx = -1;
   2.575 @@ -5332,7 +5319,6 @@
   2.576  
   2.577  static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info)
   2.578  {
   2.579 -    const int flags = info->flags;
   2.580      Uint32 pixel;
   2.581      Uint32 R, G, B, A;
   2.582      int srcy, srcx;
   2.583 @@ -5345,7 +5331,7 @@
   2.584      incx = (info->src_w << 16) / info->dst_w;
   2.585  
   2.586      while (info->dst_h--) {
   2.587 -        Uint32 *src;
   2.588 +        Uint32 *src = 0;
   2.589          Uint32 *dst = (Uint32 *)info->dst;
   2.590          int n = info->dst_w;
   2.591          srcx = -1;
   2.592 @@ -5443,7 +5429,7 @@
   2.593      incx = (info->src_w << 16) / info->dst_w;
   2.594  
   2.595      while (info->dst_h--) {
   2.596 -        Uint32 *src;
   2.597 +        Uint32 *src = 0;
   2.598          Uint32 *dst = (Uint32 *)info->dst;
   2.599          int n = info->dst_w;
   2.600          srcx = -1;
   2.601 @@ -5553,7 +5539,7 @@
   2.602      incx = (info->src_w << 16) / info->dst_w;
   2.603  
   2.604      while (info->dst_h--) {
   2.605 -        Uint32 *src;
   2.606 +        Uint32 *src = 0;
   2.607          Uint32 *dst = (Uint32 *)info->dst;
   2.608          int n = info->dst_w;
   2.609          srcx = -1;
   2.610 @@ -5675,7 +5661,7 @@
   2.611      incx = (info->src_w << 16) / info->dst_w;
   2.612  
   2.613      while (info->dst_h--) {
   2.614 -        Uint32 *src;
   2.615 +        Uint32 *src = 0;
   2.616          Uint32 *dst = (Uint32 *)info->dst;
   2.617          int n = info->dst_w;
   2.618          srcx = -1;
   2.619 @@ -5741,7 +5727,6 @@
   2.620  
   2.621  static void SDL_Blit_ABGR8888_ARGB8888_Scale(SDL_BlitInfo *info)
   2.622  {
   2.623 -    const int flags = info->flags;
   2.624      Uint32 pixel;
   2.625      Uint32 R, G, B, A;
   2.626      int srcy, srcx;
   2.627 @@ -5754,7 +5739,7 @@
   2.628      incx = (info->src_w << 16) / info->dst_w;
   2.629  
   2.630      while (info->dst_h--) {
   2.631 -        Uint32 *src;
   2.632 +        Uint32 *src = 0;
   2.633          Uint32 *dst = (Uint32 *)info->dst;
   2.634          int n = info->dst_w;
   2.635          srcx = -1;
   2.636 @@ -5852,7 +5837,7 @@
   2.637      incx = (info->src_w << 16) / info->dst_w;
   2.638  
   2.639      while (info->dst_h--) {
   2.640 -        Uint32 *src;
   2.641 +        Uint32 *src = 0;
   2.642          Uint32 *dst = (Uint32 *)info->dst;
   2.643          int n = info->dst_w;
   2.644          srcx = -1;
   2.645 @@ -5962,7 +5947,7 @@
   2.646      incx = (info->src_w << 16) / info->dst_w;
   2.647  
   2.648      while (info->dst_h--) {
   2.649 -        Uint32 *src;
   2.650 +        Uint32 *src = 0;
   2.651          Uint32 *dst = (Uint32 *)info->dst;
   2.652          int n = info->dst_w;
   2.653          srcx = -1;
   2.654 @@ -6084,7 +6069,7 @@
   2.655      incx = (info->src_w << 16) / info->dst_w;
   2.656  
   2.657      while (info->dst_h--) {
   2.658 -        Uint32 *src;
   2.659 +        Uint32 *src = 0;
   2.660          Uint32 *dst = (Uint32 *)info->dst;
   2.661          int n = info->dst_w;
   2.662          srcx = -1;
   2.663 @@ -6150,7 +6135,6 @@
   2.664  
   2.665  static void SDL_Blit_BGRA8888_RGB888_Scale(SDL_BlitInfo *info)
   2.666  {
   2.667 -    const int flags = info->flags;
   2.668      Uint32 pixel;
   2.669      Uint32 R, G, B, A;
   2.670      int srcy, srcx;
   2.671 @@ -6163,7 +6147,7 @@
   2.672      incx = (info->src_w << 16) / info->dst_w;
   2.673  
   2.674      while (info->dst_h--) {
   2.675 -        Uint32 *src;
   2.676 +        Uint32 *src = 0;
   2.677          Uint32 *dst = (Uint32 *)info->dst;
   2.678          int n = info->dst_w;
   2.679          srcx = -1;
   2.680 @@ -6261,7 +6245,7 @@
   2.681      incx = (info->src_w << 16) / info->dst_w;
   2.682  
   2.683      while (info->dst_h--) {
   2.684 -        Uint32 *src;
   2.685 +        Uint32 *src = 0;
   2.686          Uint32 *dst = (Uint32 *)info->dst;
   2.687          int n = info->dst_w;
   2.688          srcx = -1;
   2.689 @@ -6371,7 +6355,7 @@
   2.690      incx = (info->src_w << 16) / info->dst_w;
   2.691  
   2.692      while (info->dst_h--) {
   2.693 -        Uint32 *src;
   2.694 +        Uint32 *src = 0;
   2.695          Uint32 *dst = (Uint32 *)info->dst;
   2.696          int n = info->dst_w;
   2.697          srcx = -1;
   2.698 @@ -6493,7 +6477,7 @@
   2.699      incx = (info->src_w << 16) / info->dst_w;
   2.700  
   2.701      while (info->dst_h--) {
   2.702 -        Uint32 *src;
   2.703 +        Uint32 *src = 0;
   2.704          Uint32 *dst = (Uint32 *)info->dst;
   2.705          int n = info->dst_w;
   2.706          srcx = -1;
   2.707 @@ -6559,7 +6543,6 @@
   2.708  
   2.709  static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info)
   2.710  {
   2.711 -    const int flags = info->flags;
   2.712      Uint32 pixel;
   2.713      Uint32 R, G, B, A;
   2.714      int srcy, srcx;
   2.715 @@ -6572,7 +6555,7 @@
   2.716      incx = (info->src_w << 16) / info->dst_w;
   2.717  
   2.718      while (info->dst_h--) {
   2.719 -        Uint32 *src;
   2.720 +        Uint32 *src = 0;
   2.721          Uint32 *dst = (Uint32 *)info->dst;
   2.722          int n = info->dst_w;
   2.723          srcx = -1;
   2.724 @@ -6670,7 +6653,7 @@
   2.725      incx = (info->src_w << 16) / info->dst_w;
   2.726  
   2.727      while (info->dst_h--) {
   2.728 -        Uint32 *src;
   2.729 +        Uint32 *src = 0;
   2.730          Uint32 *dst = (Uint32 *)info->dst;
   2.731          int n = info->dst_w;
   2.732          srcx = -1;
   2.733 @@ -6780,7 +6763,7 @@
   2.734      incx = (info->src_w << 16) / info->dst_w;
   2.735  
   2.736      while (info->dst_h--) {
   2.737 -        Uint32 *src;
   2.738 +        Uint32 *src = 0;
   2.739          Uint32 *dst = (Uint32 *)info->dst;
   2.740          int n = info->dst_w;
   2.741          srcx = -1;
   2.742 @@ -6902,7 +6885,7 @@
   2.743      incx = (info->src_w << 16) / info->dst_w;
   2.744  
   2.745      while (info->dst_h--) {
   2.746 -        Uint32 *src;
   2.747 +        Uint32 *src = 0;
   2.748          Uint32 *dst = (Uint32 *)info->dst;
   2.749          int n = info->dst_w;
   2.750          srcx = -1;
   2.751 @@ -6968,7 +6951,6 @@
   2.752  
   2.753  static void SDL_Blit_BGRA8888_ARGB8888_Scale(SDL_BlitInfo *info)
   2.754  {
   2.755 -    const int flags = info->flags;
   2.756      Uint32 pixel;
   2.757      Uint32 R, G, B, A;
   2.758      int srcy, srcx;
   2.759 @@ -6981,7 +6963,7 @@
   2.760      incx = (info->src_w << 16) / info->dst_w;
   2.761  
   2.762      while (info->dst_h--) {
   2.763 -        Uint32 *src;
   2.764 +        Uint32 *src = 0;
   2.765          Uint32 *dst = (Uint32 *)info->dst;
   2.766          int n = info->dst_w;
   2.767          srcx = -1;
   2.768 @@ -7079,7 +7061,7 @@
   2.769      incx = (info->src_w << 16) / info->dst_w;
   2.770  
   2.771      while (info->dst_h--) {
   2.772 -        Uint32 *src;
   2.773 +        Uint32 *src = 0;
   2.774          Uint32 *dst = (Uint32 *)info->dst;
   2.775          int n = info->dst_w;
   2.776          srcx = -1;
   2.777 @@ -7189,7 +7171,7 @@
   2.778      incx = (info->src_w << 16) / info->dst_w;
   2.779  
   2.780      while (info->dst_h--) {
   2.781 -        Uint32 *src;
   2.782 +        Uint32 *src = 0;
   2.783          Uint32 *dst = (Uint32 *)info->dst;
   2.784          int n = info->dst_w;
   2.785          srcx = -1;
   2.786 @@ -7311,7 +7293,7 @@
   2.787      incx = (info->src_w << 16) / info->dst_w;
   2.788  
   2.789      while (info->dst_h--) {
   2.790 -        Uint32 *src;
   2.791 +        Uint32 *src = 0;
   2.792          Uint32 *dst = (Uint32 *)info->dst;
   2.793          int n = info->dst_w;
   2.794          srcx = -1;
     3.1 --- a/src/video/SDL_blit_slow.c	Sun Mar 06 21:15:46 2011 -0800
     3.2 +++ b/src/video/SDL_blit_slow.c	Sun Mar 06 21:17:09 2011 -0800
     3.3 @@ -54,7 +54,7 @@
     3.4      incx = (info->src_w << 16) / info->dst_w;
     3.5  
     3.6      while (info->dst_h--) {
     3.7 -        Uint8 *src;
     3.8 +        Uint8 *src = 0;
     3.9          Uint8 *dst = (Uint8 *) info->dst;
    3.10          int n = info->dst_w;
    3.11          srcx = -1;
     4.1 --- a/src/video/sdlgenblit.pl	Sun Mar 06 21:15:46 2011 -0800
     4.2 +++ b/src/video/sdlgenblit.pl	Sun Mar 06 21:17:09 2011 -0800
     4.3 @@ -274,8 +274,12 @@
     4.4      output_copyfuncname("static void", $src, $dst, $modulate, $blend, $scale, 1, "\n");
     4.5      print FILE <<__EOF__;
     4.6  {
     4.7 +__EOF__
     4.8 +    if ( $modulate || $blend ) {
     4.9 +        print FILE <<__EOF__;
    4.10      const int flags = info->flags;
    4.11  __EOF__
    4.12 +    }
    4.13      if ( $modulate ) {
    4.14          print FILE <<__EOF__;
    4.15      const Uint32 modulateR = info->r;
    4.16 @@ -309,7 +313,7 @@
    4.17      incx = (info->src_w << 16) / info->dst_w;
    4.18  
    4.19      while (info->dst_h--) {
    4.20 -        $format_type{$src} *src;
    4.21 +        $format_type{$src} *src = 0;
    4.22          $format_type{$dst} *dst = ($format_type{$dst} *)info->dst;
    4.23          int n = info->dst_w;
    4.24          srcx = -1;