Fix compilation error under Visual Studio 2010

Visual Studio 2010 use a compiler that supports only C89, which
only supports declaring variable at top of a local scope. Moving
scope variable to the top of function should solve this problem.
This commit is contained in:
Xiaodong Qi 2015-11-29 00:14:29 +08:00
parent 3375865b52
commit 602d2715a2

View File

@ -55,10 +55,11 @@ static BOOL WLog_ConsoleAppender_WriteMessage(wLog* log, wLogAppender* appender,
{
FILE* fp;
char prefix[WLOG_MAX_PREFIX_SIZE];
wLogConsoleAppender *consoleAppender;
if (!appender)
return FALSE;
wLogConsoleAppender *consoleAppender = (wLogConsoleAppender *)appender;
consoleAppender = (wLogConsoleAppender *)appender;
message->PrefixString = prefix;