Browse Source

testautomation_events.c: initialize "timestamp" to solve "conditional jump or move depends on uninitialised value"

Sylvain 2 years ago
parent
commit
2c3717881f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      test/testautomation_events.c

+ 3 - 0
test/testautomation_events.c

@@ -51,6 +51,7 @@ static int events_pushPumpAndPollUserevent(void *arg)
 
 
     /* Create user event */
     /* Create user event */
     event1.type = SDL_EVENT_USER;
     event1.type = SDL_EVENT_USER;
+    event1.common.timestamp = 0;
     event1.user.code = SDLTest_RandomSint32();
     event1.user.code = SDLTest_RandomSint32();
     event1.user.data1 = (void *)&g_userdataValue1;
     event1.user.data1 = (void *)&g_userdataValue1;
     event1.user.data2 = (void *)&g_userdataValue2;
     event1.user.data2 = (void *)&g_userdataValue2;
@@ -86,6 +87,7 @@ static int events_addDelEventWatch(void *arg)
 
 
     /* Create user event */
     /* Create user event */
     event.type = SDL_EVENT_USER;
     event.type = SDL_EVENT_USER;
+    event.common.timestamp = 0;
     event.user.code = SDLTest_RandomSint32();
     event.user.code = SDLTest_RandomSint32();
     event.user.data1 = (void *)&g_userdataValue1;
     event.user.data1 = (void *)&g_userdataValue1;
     event.user.data2 = (void *)&g_userdataValue2;
     event.user.data2 = (void *)&g_userdataValue2;
@@ -135,6 +137,7 @@ static int events_addDelEventWatchWithUserdata(void *arg)
 
 
     /* Create user event */
     /* Create user event */
     event.type = SDL_EVENT_USER;
     event.type = SDL_EVENT_USER;
+    event.common.timestamp = 0;
     event.user.code = SDLTest_RandomSint32();
     event.user.code = SDLTest_RandomSint32();
     event.user.data1 = (void *)&g_userdataValue1;
     event.user.data1 = (void *)&g_userdataValue1;
     event.user.data2 = (void *)&g_userdataValue2;
     event.user.data2 = (void *)&g_userdataValue2;