render: fix some static analysis warnings.

This commit is contained in:
Ryan C. Gordon 2018-12-03 02:06:17 -05:00
parent 33f78eb163
commit 939bf1c4d8

View File

@ -2658,6 +2658,7 @@ SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
frect.h = (float) rect->h; frect.h = (float) rect->h;
} else { } else {
SDL_Rect r; SDL_Rect r;
SDL_zero(r);
SDL_RenderGetViewport(renderer, &r); SDL_RenderGetViewport(renderer, &r);
frect.x = 0.0f; frect.x = 0.0f;
frect.y = 0.0f; frect.y = 0.0f;
@ -2677,6 +2678,7 @@ SDL_RenderFillRectF(SDL_Renderer * renderer, const SDL_FRect * rect)
/* If 'rect' == NULL, then outline the whole surface */ /* If 'rect' == NULL, then outline the whole surface */
if (!rect) { if (!rect) {
SDL_Rect r; SDL_Rect r;
SDL_zero(r);
SDL_RenderGetViewport(renderer, &r); SDL_RenderGetViewport(renderer, &r);
frect.x = 0.0f; frect.x = 0.0f;
frect.y = 0.0f; frect.y = 0.0f;