++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;
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;
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;
}
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;
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;