Commit d7a253b5ec7701bc073223d272fa8e162bc0e2c7

Ryan C. Gordon 2014-03-20T16:25:30

Static analysis fix: uninitialized data. (Clang doesn't know that "_this" was already checked for NULLness elsewhere.)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index dc14222..bd04b44 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1570,6 +1570,8 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y)
         int displayIndex;
         SDL_Rect bounds;
 
+        SDL_zero(bounds);
+
         displayIndex = SDL_GetIndexOfDisplay(display);
         SDL_GetDisplayBounds(displayIndex, &bounds);
         if (SDL_WINDOWPOS_ISCENTERED(x)) {