SDL_test_harness.c: Fix warning -Wcast-function-type-strict
This commit is contained in:
committed by
Sam Lantinga
parent
0b6f993dea
commit
323b60abf1
@@ -185,7 +185,7 @@ static Uint64 SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName
|
|||||||
*
|
*
|
||||||
* \return Timer id or -1 on failure.
|
* \return Timer id or -1 on failure.
|
||||||
*/
|
*/
|
||||||
static SDL_TimerID SDLTest_SetTestTimeout(int timeout, void(SDLCALL *callback)(void))
|
static SDL_TimerID SDLTest_SetTestTimeout(int timeout, SDL_TimerCallback callback)
|
||||||
{
|
{
|
||||||
Uint32 timeoutInMilliseconds;
|
Uint32 timeoutInMilliseconds;
|
||||||
SDL_TimerID timerID;
|
SDL_TimerID timerID;
|
||||||
@@ -210,7 +210,7 @@ static SDL_TimerID SDLTest_SetTestTimeout(int timeout, void(SDLCALL *callback)(v
|
|||||||
|
|
||||||
/* Set timer */
|
/* Set timer */
|
||||||
timeoutInMilliseconds = timeout * 1000;
|
timeoutInMilliseconds = timeout * 1000;
|
||||||
timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback)callback, 0x0);
|
timerID = SDL_AddTimer(timeoutInMilliseconds, callback, 0x0);
|
||||||
if (timerID == 0) {
|
if (timerID == 0) {
|
||||||
SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError());
|
SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError());
|
||||||
return 0;
|
return 0;
|
||||||
@@ -222,13 +222,11 @@ static SDL_TimerID SDLTest_SetTestTimeout(int timeout, void(SDLCALL *callback)(v
|
|||||||
/**
|
/**
|
||||||
* Timeout handler. Aborts test run and exits harness process.
|
* Timeout handler. Aborts test run and exits harness process.
|
||||||
*/
|
*/
|
||||||
#ifdef __WATCOMC__
|
static Uint32 SDLCALL SDLTest_BailOut(void *userdata, SDL_TimerID timerID, Uint32 interval)
|
||||||
#pragma aux SDLTest_BailOut aborts;
|
|
||||||
#endif
|
|
||||||
static SDL_NORETURN void SDLCALL SDLTest_BailOut(void)
|
|
||||||
{
|
{
|
||||||
SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");
|
SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");
|
||||||
exit(TEST_ABORTED); /* bail out from the test */
|
exit(TEST_ABORTED); /* bail out from the test */
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user