From 548f7ad80abc253a38171b7e4eb1c84a6b179a41 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 1 Jul 2023 06:07:11 -0700 Subject: Don't pass the file handle to al_print --- core/logging.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/logging.h') diff --git a/core/logging.h b/core/logging.h index f4b6ab56..c99c4e45 100644 --- a/core/logging.h +++ b/core/logging.h @@ -17,35 +17,35 @@ extern LogLevel gLogLevel; extern FILE *gLogFile; #ifdef __USE_MINGW_ANSI_STDIO -[[gnu::format(gnu_printf,3,4)]] +[[gnu::format(gnu_printf,2,3)]] #else -[[gnu::format(printf,3,4)]] +[[gnu::format(printf,2,3)]] #endif -void al_print(LogLevel level, FILE *logfile, const char *fmt, ...); +void al_print(LogLevel level, const char *fmt, ...); #if (!defined(_WIN32) || defined(NDEBUG)) && !defined(__ANDROID__) #define TRACE(...) do { \ if(gLogLevel >= LogLevel::Trace) UNLIKELY \ - al_print(LogLevel::Trace, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Trace, __VA_ARGS__); \ } while(0) #define WARN(...) do { \ if(gLogLevel >= LogLevel::Warning) UNLIKELY \ - al_print(LogLevel::Warning, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Warning, __VA_ARGS__); \ } while(0) #define ERR(...) do { \ if(gLogLevel >= LogLevel::Error) UNLIKELY \ - al_print(LogLevel::Error, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Error, __VA_ARGS__); \ } while(0) #else -#define TRACE(...) al_print(LogLevel::Trace, gLogFile, __VA_ARGS__) +#define TRACE(...) al_print(LogLevel::Trace, __VA_ARGS__) -#define WARN(...) al_print(LogLevel::Warning, gLogFile, __VA_ARGS__) +#define WARN(...) al_print(LogLevel::Warning, __VA_ARGS__) -#define ERR(...) al_print(LogLevel::Error, gLogFile, __VA_ARGS__) +#define ERR(...) al_print(LogLevel::Error, __VA_ARGS__) #endif #endif /* CORE_LOGGING_H */ -- cgit v1.2.3