fixed several -Wzero-as-null-pointer-constant warnings from gcc-15
This commit is contained in:
@@ -192,7 +192,6 @@ static SDL_TimerID SDLTest_SetTestTimeout(int timeout, SDL_TimerCallback callbac
|
||||
SDLTest_LogError("Timeout callback can't be NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (timeout < 0) {
|
||||
SDLTest_LogError("Timeout value must be bigger than zero.");
|
||||
return 0;
|
||||
@@ -200,7 +199,7 @@ static SDL_TimerID SDLTest_SetTestTimeout(int timeout, SDL_TimerCallback callbac
|
||||
|
||||
/* Set timer */
|
||||
timeoutInMilliseconds = timeout * 1000;
|
||||
timerID = SDL_AddTimer(timeoutInMilliseconds, callback, 0x0);
|
||||
timerID = SDL_AddTimer(timeoutInMilliseconds, callback, NULL);
|
||||
if (timerID == 0) {
|
||||
SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError());
|
||||
return 0;
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Used by the test framework and test cases.
|
||||
|
||||
*/
|
||||
|
||||
/* quiet windows compiler warnings */
|
||||
@@ -89,7 +87,7 @@ void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
|
||||
va_end(list);
|
||||
|
||||
/* Log with timestamp and newline */
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(NULL)), logMessage);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -107,7 +105,7 @@ void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
|
||||
va_end(list);
|
||||
|
||||
/* Log with timestamp and newline */
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage);
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(NULL)), logMessage);
|
||||
}
|
||||
|
||||
static char nibble_to_char(Uint8 nibble)
|
||||
|
||||
Reference in New Issue
Block a user