summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-29 12:58:21 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-29 12:58:21 +0000
commit396c966cd2b3af2dbdb5b157e9ebb2e576b677b0 (patch)
treeee5c819fb7fae346ec982a8c34d642975de31aee /src/log.h
parent94d849ad87bd53c6c51530ea7c0b084ca6899533 (diff)
downloadmana-client-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.gz
mana-client-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.bz2
mana-client-396c966cd2b3af2dbdb5b157e9ebb2e576b677b0.tar.xz
mana-client-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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/log.h b/src/log.h
index dd1c0f91..6fe9dccd 100644
--- a/src/log.h
+++ b/src/log.h
@@ -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