From b1e1f7cf0afc48f900f5a83e11441d6a2b835918 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Wed, 9 Jan 2013 19:19:44 +0100 Subject: [PATCH] Fixed compile error for unused buffer --- ogl_editor/src/rlog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ogl_editor/src/rlog.c b/ogl_editor/src/rlog.c index 6574278..04c1141 100644 --- a/ogl_editor/src/rlog.c +++ b/ogl_editor/src/rlog.c @@ -14,7 +14,6 @@ static int s_old_level = 0; void rlog(int logLevel, const char* format, ...) { - char buffer[2048]; va_list ap; if (logLevel < s_log_level) @@ -22,8 +21,11 @@ void rlog(int logLevel, const char* format, ...) va_start(ap, format); #if defined(_WIN32) - vsprintf(buffer, format, ap); - OutputDebugStringA(buffer); + { + char buffer[2048]; + vsprintf(buffer, format, ap); + OutputDebugStringA(buffer); + } #else vprintf(format, ap); #endif