소스 검색

emscripten tests: fix warning: uninitialized variable

Petar Popovic 1 개월 전
부모
커밋
45feacf608
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      test/testautomation_rect.c

+ 3 - 3
test/testautomation_rect.c

@@ -916,7 +916,7 @@ static int SDLCALL rect_testIntersectRectEmpty(void *arg)
  */
 static int SDLCALL rect_testIntersectRectParam(void *arg)
 {
-    SDL_Rect rectA;
+    SDL_Rect rectA = { 0 };
     SDL_Rect rectB = { 0 };
     SDL_Rect result;
     bool intersection;
@@ -1165,7 +1165,7 @@ static int SDLCALL rect_testHasIntersectionEmpty(void *arg)
  */
 static int SDLCALL rect_testHasIntersectionParam(void *arg)
 {
-    SDL_Rect rectA;
+    SDL_Rect rectA = { 0 };
     SDL_Rect rectB = { 0 };
     bool intersection;
 
@@ -1726,7 +1726,7 @@ static int SDLCALL rect_testUnionRectInside(void *arg)
  */
 static int SDLCALL rect_testUnionRectParam(void *arg)
 {
-    SDL_Rect rectA, rectB = { 0 };
+    SDL_Rect rectA = { 0 }, rectB = { 0 };
     SDL_Rect result;
 
     /* invalid parameter combinations */