From 93ba5bd8994bebb996838cc4e706416eef8424da Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 20 Mar 2014 16:23:18 -0400 Subject: [PATCH] Static analysis fix: uninitialized value. (A false positive: clang doesn't know SDL_SetError() always returns -1.) --- src/render/SDL_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 3ab0fd5df..2a5ea4157 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -350,7 +350,7 @@ SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h) 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 @@ SDL_GetRenderTarget(SDL_Renderer *renderer) static int UpdateLogicalSize(SDL_Renderer *renderer) { - int w, h; + int w = 1, h = 1; float want_aspect; float real_aspect; float scale;