From 08de74ec491ac173016c9367c5aeabd39b38de47 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 13 Jun 2018 14:45:02 +0300 Subject: [PATCH] use the 'aborts' pragma of Watcom for SDL_NORETURN functions SDL_ExitProcess(), SDL_AbortAssertion() and SDLTest_BailOut(). (Commit 303c1e0fb0cf for bug #4100 removed SDL_NORETURN from SDL_ExitProcess() and SDL_AbortAssertion() in order to avoid warnings from windows builds, but that's temporary I guess..) --- src/SDL_assert.c | 6 ++++++ src/test/SDL_test_harness.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/SDL_assert.c b/src/SDL_assert.c index 355637db9..1ca083ad4 100644 --- a/src/SDL_assert.c +++ b/src/SDL_assert.c @@ -120,6 +120,9 @@ static void SDL_GenerateAssertionReport(void) } +#if defined(__WATCOMC__) +#pragma aux SDL_ExitProcess aborts; +#endif static void SDL_ExitProcess(int exitcode) { #ifdef __WIN32__ @@ -138,6 +141,9 @@ static void SDL_ExitProcess(int exitcode) } +#if defined(__WATCOMC__) +#pragma aux SDL_AbortAssertion aborts; +#endif static void SDL_AbortAssertion(void) { SDL_Quit(); diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c index 15021c6fd..80b07940d 100644 --- a/src/test/SDL_test_harness.c +++ b/src/test/SDL_test_harness.c @@ -206,6 +206,9 @@ SDLTest_SetTestTimeout(int timeout, void (*callback)()) /** * \brief Timeout handler. Aborts test run and exits harness process. */ +#if defined(__WATCOMC__) +#pragma aux SDLTest_BailOut aborts; +#endif static SDL_NORETURN void SDLTest_BailOut() {