From: Wolfgang (Blub) Bumiller Date: Tue, 14 Aug 2012 09:54:06 +0000 (+0200) Subject: used the wrong va_list there... why didn't gcc warn about this being uninitialized... X-Git-Tag: 0.1-rc1~324 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4dad7c7d50c9d35161390505a414e9a1bf25c723;p=xonotic%2Fgmqcc.git used the wrong va_list there... why didn't gcc warn about this being uninitialized... --- diff --git a/error.c b/error.c index c34abdb..8fbd91f 100644 --- a/error.c +++ b/error.c @@ -39,14 +39,12 @@ int levelcolor[] = { void vprintmsg(int level, const char *name, size_t line, char *errtype, const char *msg, va_list ap) { - va_list va; - #ifndef WIN32 fprintf (stderr, "\033[0;%dm%s:%d \033[0;%dm%s: \033[0m", CON_CYAN, name, (int)line, levelcolor[level], errtype); #else fprintf (stderr, "%s:%d %s: ", name, line, errtype); #endif - vfprintf(stderr, msg, va); + vfprintf(stderr, msg, ap); fprintf (stderr, "\n"); }