From 0f99ae3459e9e87a28b6e9e2755398f334d6ebe1 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 17 Dec 2012 18:24:16 +0100 Subject: [PATCH] ftepp_warn to use vcompile_warning --- ftepp.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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) -- 2.39.2