Skip to content

Commit

Permalink
Stop LogTrace() from emitting a compiler warning when called with a p…
Browse files Browse the repository at this point in the history
…lain string.
  • Loading branch information
tarunik committed Oct 6, 2020
1 parent cd2aab8 commit 0d7d668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ bool ParseLoggerArguments(

///Helper for logging "trace" messages with the function name prepended to the message
#ifdef __GNUC__
#define LogTrace(fmt, ...) LogDebugTrace(__PRETTY_FUNCTION__, fmt, ##__VA_ARGS__)
#define LogTrace(...) LogDebugTrace(__PRETTY_FUNCTION__, ##__VA_ARGS__)
#else
#define LogTrace(fmt, ...) LogDebugTrace(__func__, fmt, __VA_ARGS__)
#define LogTrace(...) LogDebugTrace(__func__, __VA_ARGS__)
#endif

ATTR_FORMAT(1, 2) void LogVerbose(const char *format, ...);
Expand Down

0 comments on commit 0d7d668

Please sign in to comment.