Build warning fixes for gcc-11.3

This commit is contained in:
Christoph Reichenbach 2022-06-04 13:03:51 +00:00 committed by Ozkan Sezer
parent b359282a5c
commit 4e07d4722d
3 changed files with 8 additions and 3 deletions

View File

@ -707,7 +707,7 @@ int rect_testIntersectRectEmpty (void *arg)
int rect_testIntersectRectParam(void *arg)
{
SDL_Rect rectA;
SDL_Rect rectB;
SDL_Rect rectB = {0};
SDL_Rect result;
SDL_bool intersection;
@ -962,7 +962,7 @@ int rect_testHasIntersectionEmpty (void *arg)
int rect_testHasIntersectionParam(void *arg)
{
SDL_Rect rectA;
SDL_Rect rectB;
SDL_Rect rectB = {0};
SDL_bool intersection;
/* invalid parameter combinations */

View File

@ -178,6 +178,10 @@ void _testBlitBlendMode(int mode)
bmode = SDL_BLENDMODE_ADD;
} else if (nmode==3) {
bmode = SDL_BLENDMODE_MOD;
} else {
/* Should be impossible, but some static checkers are too imprecise and will complain */
SDLTest_LogError("Invalid: nmode=%d", nmode);
return;
}
ret = SDL_SetSurfaceBlendMode( face, bmode );
if (ret != 0) checkFailCount4++;

View File

@ -1372,7 +1372,8 @@ video_getSetWindowMinimumSize(void *arg)
int wVariation, hVariation;
int referenceW, referenceH;
int currentW, currentH;
int desiredW, desiredH;
int desiredW = 1;
int desiredH = 1;
/* Get display bounds for size range */
result = SDL_GetDisplayBounds(0, &display);