From: Wolfgang (Blub) Bumiller Date: Mon, 17 Dec 2012 17:25:06 +0000 (+0100) Subject: irwarning to use vcompile_warning X-Git-Tag: 0.1.9~76 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2534076963894e7f43ba0366566184f2cd21fe57;p=xonotic%2Fgmqcc.git irwarning to use vcompile_warning --- diff --git a/ir.c b/ir.c index a2c4a8a..3467d32 100644 --- a/ir.c +++ b/ir.c @@ -208,20 +208,12 @@ static void irerror(lex_ctx ctx, const char *msg, ...) static bool irwarning(lex_ctx ctx, int warntype, const char *fmt, ...) { + bool r; va_list ap; - int lvl = LVL_WARNING; - - if (warntype && !OPTS_WARN(warntype)) - return false; - - if (opts.werror) - lvl = LVL_ERROR; - va_start(ap, fmt); - con_vprintmsg(lvl, ctx.file, ctx.line, (opts.werror ? "error" : "warning"), fmt, ap); + r = vcompile_warning(ctx, warntype, fmt, ap); va_end(ap); - - return opts.werror; + return r; } /***********************************************************************