minimal fixes to visual test, so that it actually builds w/o warnings:

- linux_process.c: add an SDLVisualTest_ScreenshotProcess() stub for
  linux builds succeed.
- action_configparser.c: fixes -Wswitch warnings.
- testharness.c: fixes 'is used uninitialized' warnings for userevents.
- testharness.c: fixes format string argument to 'Force killing...'
- testquit.c: fix type of options array in main().
- windows_screenshot.c: lowercase windows.h header name.
- ran dos2unix on all sources and add missing newlines at files' ends.
- minor adjustments to autotools build system (which actually seems to
  need more surgery for unnecessary stuff...)
This commit is contained in:
Ozkan Sezer
2021-12-21 14:24:20 +03:00
parent 505df1a99b
commit 449ef08dcc
24 changed files with 452 additions and 370 deletions

View File

@@ -1,6 +1,6 @@
/* See LICENSE.txt for the full license governing this code. */
/**
* \file testharness.c
* \file testharness.c
*
* Source file for the test harness.
*/
@@ -82,10 +82,10 @@ ActionTimerCallback(Uint32 interval, void* param)
Uint32 next_action_time;
/* push an event to handle the action */
SDL_zero(userevent);
userevent.type = SDL_USEREVENT;
userevent.code = ACTION_TIMER_EVENT;
userevent.data1 = &current->action;
userevent.data2 = NULL;
event.type = SDL_USEREVENT;
event.user = userevent;
@@ -110,10 +110,9 @@ KillTimerCallback(Uint32 interval, void* param)
SDL_Event event;
SDL_UserEvent userevent;
SDL_zero(userevent);
userevent.type = SDL_USEREVENT;
userevent.code = KILL_TIMER_EVENT;
userevent.data1 = NULL;
userevent.data2 = NULL;
event.type = SDL_USEREVENT;
event.user = userevent;
@@ -181,7 +180,7 @@ ProcessAction(SDLVisualTest_Action* action, int* sut_running, char* args)
if(SDL_IsProcessRunning(&action_process) > 0)
{
SDLTest_LogError("Process %s took too long too complete."
" Force killing...", action->extra);
" Force killing...", action->extra.process.path);
if(!SDL_KillProcess(&action_process, &ps))
{
SDLTest_LogError("SDL_KillProcess() failed");
@@ -519,7 +518,7 @@ main(int argc, char* argv[])
}
goto cleanup_variator;
}
goto cleanup_sdl;
cleanup_variator: