Static analysis fix: uninitialized value.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 20 Mar 2014 16:23:18 -0400
changeset 8654 275c4c82803b
parent 8653 b50c61457c91
child 8655 edd378be2433
Static analysis fix: uninitialized value. (A false positive: clang doesn't know SDL_SetError() always returns -1.)
src/render/SDL_render.c
--- a/src/render/SDL_render.c	Thu Mar 20 16:05:57 2014 -0400
+++ b/src/render/SDL_render.c	Thu Mar 20 16:23:18 2014 -0400
@@ -350,7 +350,7 @@
         SDL_GetWindowSize(renderer->window, w, h);
         return 0;
     } else {
-        /* This should never happen */
+        SDL_assert(0 && "This should never happen");
         return SDL_SetError("Renderer doesn't support querying output size");
     }
 }
@@ -1117,7 +1117,7 @@
 static int
 UpdateLogicalSize(SDL_Renderer *renderer)
 {
-    int w, h;
+    int w = 1, h = 1;
     float want_aspect;
     float real_aspect;
     float scale;