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
1 changed files with 2 additions and 0 deletions

View File

@ -2658,6 +2658,7 @@ SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
frect.h = (float) rect->h;
} else {
SDL_Rect r;
SDL_zero(r);
SDL_RenderGetViewport(renderer, &r);
frect.x = 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) {
SDL_Rect r;
SDL_zero(r);
SDL_RenderGetViewport(renderer, &r);
frect.x = 0.0f;
frect.y = 0.0f;