Fix compilation C90 mixed declarations and code (Thanks Cameron Gutman !)
authorSylvain Becker <sylvain.becker@gmail.com>
Tue, 25 Feb 2020 06:53:51 +0100
changeset 135522f75c19fd2f2
parent 13551 4efb3eb7a3b3
child 13553 78754c9488f6
Fix compilation C90 mixed declarations and code (Thanks Cameron Gutman !)
src/video/SDL_surface.c
     1.1 --- a/src/video/SDL_surface.c	Mon Feb 24 21:57:03 2020 +0100
     1.2 +++ b/src/video/SDL_surface.c	Tue Feb 25 06:53:51 2020 +0100
     1.3 @@ -1052,8 +1052,8 @@
     1.4  
     1.5          /* Set opaque and backup palette alpha values */
     1.6          if (set_opaque) {
     1.7 +            int i;
     1.8              palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors);
     1.9 -            int i;
    1.10              for (i = 0; i < surface->format->palette->ncolors; i++) {
    1.11                  palette_saved_alpha[i] = surface->format->palette->colors[i].a;
    1.12                  surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;