summaryrefslogtreecommitdiff
path: root/src/gamelog.cpp
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/gamelog.cpp
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/gamelog.cpp')
-rw-r--r--src/gamelog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gamelog.cpp b/src/gamelog.cpp
index e47a19f0a..55b6a7468 100644
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -85,6 +85,8 @@ enum {
static int _dbgofs = 0; ///< offset in current output buffer
+static void AddDebugText(char *buf, const char *s, ...) WARN_FORMAT(2, 3);
+
static void AddDebugText(char *buf, const char *s, ...)
{
if (GAMELOG_BUF_LEN <= _dbgofs) return;
@@ -277,7 +279,7 @@ static int _gamelog_print_level = 0; ///< gamelog debug level we need to print s
static void GamelogPrintDebugProc(const char *s)
{
- DEBUG(gamelog, _gamelog_print_level, s);
+ DEBUG(gamelog, _gamelog_print_level, "%s", s);
}