From: Wolfgang (Blub) Bumiller <blub@speed.at>
Date: Mon, 17 Dec 2012 17:24:16 +0000 (+0100)
Subject: ftepp_warn to use vcompile_warning
X-Git-Tag: 0.1.9~77
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0f99ae3459e9e87a28b6e9e2755398f334d6ebe1;p=xonotic%2Fgmqcc.git

ftepp_warn to use vcompile_warning
---

diff --git a/ftepp.c b/ftepp.c
index d3e58df..fbe6f96 100644
--- a/ftepp.c
+++ b/ftepp.c
@@ -95,21 +95,13 @@ static void ftepp_error(ftepp_t *ftepp, const char *fmt, ...)
 
 static bool GMQCC_WARN ftepp_warn(ftepp_t *ftepp, int warntype, const char *fmt, ...)
 {
+    bool    r;
     va_list ap;
-    int lvl = LVL_WARNING;
-
-    if (!OPTS_WARN(warntype))
-        return false;
-
-    if (opts.werror) {
-	    lvl = LVL_ERROR;
-        ftepp->errors++;
-    }
 
     va_start(ap, fmt);
-    con_cvprintmsg((void*)&ftepp->lex->tok.ctx, lvl, "error", fmt, ap);
+    r = vcompile_warning(ftepp->lex->tok.ctx, warntype, fmt, ap);
     va_end(ap);
-    return opts.werror;
+    return r;
 }
 
 static pptoken *pptoken_make(ftepp_t *ftepp)