Browse Source

Fix static analysis warning in SDL_render.c

Sylvain Becker 5 years ago
parent
commit
39690a0478
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/render/SDL_render.c

+ 2 - 1
src/render/SDL_render.c

@@ -1745,7 +1745,8 @@ SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect,
 {
     SDL_Rect real_rect;
     void *pixels = NULL;
-    int pitch, ret;
+    int pitch = 0; /* fix static analysis */
+    int ret;
 
     if (texture == NULL || surface == NULL) {
         return -1;