ftepp->errors++;
va_start(ap, fmt);
- con_vprintmsg(LVL_ERROR, ctx.file, ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ctx, LVL_ERROR, "error", fmt, ap);
va_end(ap);
}
ftepp->errors++;
va_start(ap, fmt);
- con_vprintmsg(LVL_ERROR, ftepp->lex->tok.ctx.file, ftepp->lex->tok.ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ftepp->lex->tok.ctx, LVL_ERROR, "error", fmt, ap);
va_end(ap);
}
}
va_start(ap, fmt);
- con_vprintmsg(lvl, ftepp->lex->tok.ctx.file, ftepp->lex->tok.ctx.line, "error", fmt, ap);
+ con_cvprintmsg((void*)&ftepp->lex->tok.ctx, lvl, "error", fmt, ap);
va_end(ap);
return opts_werror;
}
static ppmacro *ppmacro_new(lex_ctx ctx, const char *name)
{
ppmacro *macro = (ppmacro*)mem_a(sizeof(ppmacro));
+
+ (void)ctx;
memset(macro, 0, sizeof(*macro));
macro->name = util_strdup(name);
return macro;
ftepp_error(ftepp, "unrecognized preprocessor directive: `%s`", ftepp_tokval(ftepp));
return false;
}
- break;
+ /* break; never reached */
default:
ftepp_error(ftepp, "unexpected preprocessor token: `%s`", ftepp_tokval(ftepp));
return false;