mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-17 14:47:19 +01:00
Fix "format not a string literal" errors
With GCC 6.1. https://bugzilla.libsdl.org/show_bug.cgi?id=3375
This commit is contained in:
parent
461336a23e
commit
7edd2261e7
@ -116,6 +116,8 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
/* This function has a bit more overhead than most error functions
|
/* This function has a bit more overhead than most error functions
|
||||||
so that it supports internationalization and thread-safe errors.
|
so that it supports internationalization and thread-safe errors.
|
||||||
*/
|
*/
|
||||||
@ -216,6 +218,7 @@ SDL_GetErrorMsg(char *errstr, int maxlen)
|
|||||||
}
|
}
|
||||||
return (errstr);
|
return (errstr);
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/* Available for backwards compatibility */
|
/* Available for backwards compatibility */
|
||||||
const char *
|
const char *
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
*
|
*
|
||||||
* \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
|
* \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
|
||||||
*/
|
*/
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
char *SDLTest_TimestampToString(const time_t timestamp)
|
char *SDLTest_TimestampToString(const time_t timestamp)
|
||||||
{
|
{
|
||||||
time_t copy;
|
time_t copy;
|
||||||
@ -64,6 +66,7 @@ char *SDLTest_TimestampToString(const time_t timestamp)
|
|||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prints given message with a timestamp in the TEST category and INFO priority.
|
* Prints given message with a timestamp in the TEST category and INFO priority.
|
||||||
|
Loading…
Reference in New Issue
Block a user