mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-19 14:01:01 +00:00
WIN_AdjustWindowRectWithStyle: silence gcc maybe-uninitialized warnings
/tmp/SDL3/src/video/windows/SDL_windowswindow.c: In function 'WIN_SetWindowPositionInternal':
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:216:17: warning: 'h' may be used uninitialized in this function [-Wmaybe-uninitialized]
rect.bottom = *height;
~~~~~~~~~~~~^~~~~~~~~
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:320:12: note: 'h' was declared here
int w, h;
^
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:215:16: warning: 'w' may be used uninitialized in this function [-Wmaybe-uninitialized]
rect.right = *width;
~~~~~~~~~~~^~~~~~~~
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:320:9: note: 'w' was declared here
int w, h;
^
This commit is contained in:
committed by
Sam Lantinga
parent
a801f81132
commit
d41e48e4c6
@@ -206,6 +206,8 @@ static int WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, DWORD
|
||||
default:
|
||||
/* Should never be here */
|
||||
SDL_assert_release(SDL_FALSE);
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
}
|
||||
|
||||
/* Copy the client size in pixels into this rect structure,
|
||||
|
||||
Reference in New Issue
Block a user