]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
-Werror now changes the word 'warning' into 'error'
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 4 Dec 2012 11:54:53 +0000 (12:54 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 4 Dec 2012 11:54:53 +0000 (12:54 +0100)
con.c
ir.c
lexer.c
parser.c

diff --git a/con.c b/con.c
index cd1e145155453b26caf817ae8f724f41add05144..1cd7b326d10956192bb16983f538ac6744c65767 100644 (file)
--- 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 dbb1d97a46ae58e8d881a3ec40a351aaa395ba49..1640f88cff4148a87926047de5effcc96a96e80c 100644 (file)
--- 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 8e783e6988c449001e224336b12d7f022d460d46..8fb7ef0547109fff9eb32e4d8537047a11a5559d 100644 (file)
--- 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;
index 8001ffaa39a3c63eafa7e3e541216ad7d870cdd6..d0340dd5b97ee8b1a129c0b208b9774423e16cbb 100644 (file)
--- 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;