mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
ftepp_warn to use vcompile_warning
This commit is contained in:
parent
fe344cb5b2
commit
0f99ae3459
1 changed files with 3 additions and 11 deletions
14
ftepp.c
14
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)
|
||||
|
|
Loading…
Reference in a new issue