diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-29 12:58:21 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-29 12:58:21 +0000 |
commit | 396c966cd2b3af2dbdb5b157e9ebb2e576b677b0 (patch) | |
tree | ee5c819fb7fae346ec982a8c34d642975de31aee /src/log.h | |
parent | 94d849ad87bd53c6c51530ea7c0b084ca6899533 (diff) | |
download | mana-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.gz mana-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.bz2 mana-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.xz mana-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.zip |
When compiling with GCC, use the printf format attribute for the log method so
that the compiler checks the type of its parameters.
Diffstat (limited to 'src/log.h')
-rw-r--r-- | src/log.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -61,7 +61,11 @@ class Logger /** * Enters a message in the log. The message will be timestamped. */ - void log(const char *log_text, ...); + void log(const char *log_text, ...) +#ifdef __GNUC__ + __attribute__((__format__(__printf__, 2, 3))) +#endif + ; /** * Log an error and quit. The error will pop-up in Windows and will be |