Static analysis fix: uninitialized data.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 20 Mar 2014 16:54:20 -0400
changeset 8656 d62ef586c696
parent 8655 edd378be2433
child 8657 9be67c80e84e
Static analysis fix: uninitialized data. (This is Clang not knowing that SDL_SetError() always returns -1.)
src/video/SDL_video.c
--- a/src/video/SDL_video.c	Thu Mar 20 16:25:30 2014 -0400
+++ b/src/video/SDL_video.c	Thu Mar 20 16:54:20 2014 -0400
@@ -1128,6 +1128,8 @@
         if (setDisplayMode) {
             SDL_DisplayMode fullscreen_mode;
 
+            SDL_zero(fullscreen_mode);
+
             if (SDL_GetWindowDisplayMode(other, &fullscreen_mode) == 0) {
                 SDL_bool resized = SDL_TRUE;