From 2534076963894e7f43ba0366566184f2cd21fe57 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 17 Dec 2012 18:25:06 +0100 Subject: [PATCH] irwarning to use vcompile_warning --- ir.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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; } /*********************************************************************** -- 2.39.2