summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
committersmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
commitf5316c5cbd13c3ce8c0a7d8b652ce7d975c17438 (patch)
treee9c57e3fa45a652740e681f7d25b731d7b2f9cfb /src/debug.h
parent552f10bb09667a7c36724092d290808c2c9e51b4 (diff)
downloadopenttd-f5316c5cbd13c3ce8c0a7d8b652ce7d975c17438.tar.xz
(svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/debug.h b/src/debug.h
index c7a71c67a..b21cd6434 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -50,19 +50,12 @@
extern int _debug_gamelog_level;
extern int _debug_desync_level;
- void CDECL debug(const char *dbg, ...);
+ void CDECL debug(const char *dbg, const char *format, ...) WARN_FORMAT(2, 3);
#endif /* NO_DEBUG_MESSAGES */
void SetDebugString(const char *s);
const char *GetDebugString();
-/* MSVCRT of course has to have a different syntax for long long *sigh* */
-#if defined(_MSC_VER) || defined(__MINGW32__)
- #define OTTD_PRINTF64 "I64"
-#else
- #define OTTD_PRINTF64 "ll"
-#endif
-
/* Used for profiling
*
* Usage:
@@ -100,6 +93,6 @@ const char *GetDebugString();
}
void ShowInfo(const char *str);
-void CDECL ShowInfoF(const char *str, ...);
+void CDECL ShowInfoF(const char *str, ...) WARN_FORMAT(1, 2);
#endif /* DEBUG_H */