From: Wolfgang (Blub) Bumiller Date: Tue, 4 Dec 2012 11:54:53 +0000 (+0100) Subject: -Werror now changes the word 'warning' into 'error' X-Git-Tag: 0.1.9~117 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8e077f378e7860d6a8e0fc2190a85c42dfda3731;p=xonotic%2Fgmqcc.git -Werror now changes the word 'warning' into 'error' --- diff --git a/con.c b/con.c index cd1e145..1cd7b32 100644 --- a/con.c +++ b/con.c @@ -393,7 +393,7 @@ bool GMQCC_WARN compile_warning(lex_ctx ctx, int warntype, const char *fmt, ...) ++compile_warnings; va_start(ap, fmt); - con_vprintmsg(lvl, ctx.file, ctx.line, "warning", fmt, ap); + con_vprintmsg(lvl, ctx.file, ctx.line, (opts_werror ? "error" : "warning"), fmt, ap); va_end(ap); return opts_werror; diff --git a/ir.c b/ir.c index dbb1d97..1640f88 100644 --- a/ir.c +++ b/ir.c @@ -218,7 +218,7 @@ static bool irwarning(lex_ctx ctx, int warntype, const char *fmt, ...) lvl = LVL_ERROR; va_start(ap, fmt); - con_vprintmsg(lvl, ctx.file, ctx.line, "warning", fmt, ap); + con_vprintmsg(lvl, ctx.file, ctx.line, (opts_werror ? "error" : "warning"), fmt, ap); va_end(ap); return opts_werror; diff --git a/lexer.c b/lexer.c index 8e783e6..8fb7ef0 100644 --- a/lexer.c +++ b/lexer.c @@ -84,7 +84,7 @@ bool lexwarn(lex_file *lex, int warntype, const char *fmt, ...) lvl = LVL_ERROR; va_start(ap, fmt); - con_vprintmsg(lvl, lex->name, lex->sline, "warning", fmt, ap); + con_vprintmsg(lvl, lex->name, lex->sline, (opts_werror ? "error" : "warning"), fmt, ap); va_end(ap); return opts_werror; diff --git a/parser.c b/parser.c index 8001ffa..d0340dd 100644 --- a/parser.c +++ b/parser.c @@ -136,7 +136,7 @@ static bool GMQCC_WARN parsewarning(parser_t *parser, int warntype, const char * } va_start(ap, fmt); - con_vprintmsg(lvl, parser->lex->tok.ctx.file, parser->lex->tok.ctx.line, "warning", fmt, ap); + con_vprintmsg(lvl, parser->lex->tok.ctx.file, parser->lex->tok.ctx.line, (opts_werror ? "error" : "warning"), fmt, ap); va_end(ap); return opts_werror; @@ -154,7 +154,7 @@ static bool GMQCC_WARN genwarning(lex_ctx ctx, int warntype, const char *fmt, .. lvl = LVL_ERROR; va_start(ap, fmt); - con_vprintmsg(lvl, ctx.file, ctx.line, "warning", fmt, ap); + con_vprintmsg(lvl, ctx.file, ctx.line, (opts_werror ? "error" : "warning"), fmt, ap); va_end(ap); return opts_werror;