add HAVE_GCC_DIAGNOSTIC_PRAGMA to SDL_internal.h, use it

This commit is contained in:
Ozkan Sezer 2023-11-23 11:33:20 +03:00
parent 42c8366fdc
commit 5730eb67f0
9 changed files with 34 additions and 14 deletions

View file

@ -65,7 +65,7 @@ static SDL_LogOutputFunction SDL_log_function = SDL_LogOutput;
static void *SDL_log_userdata = NULL;
static SDL_Mutex *log_function_mutex = NULL;
#ifdef __GNUC__
#ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
@ -80,7 +80,7 @@ static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
"CRITICAL"
};
#ifdef __GNUC__
#ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA
#pragma GCC diagnostic pop
#endif