mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
don't warn about unused end_sys_{globals,fields}
This commit is contained in:
parent
984d8e7adc
commit
4742ee9123
1 changed files with 6 additions and 2 deletions
8
parser.c
8
parser.c
|
@ -2928,8 +2928,12 @@ bool parser_finish(const char *output)
|
||||||
continue;
|
continue;
|
||||||
asvalue = (ast_value*)(parser->globals[i].var);
|
asvalue = (ast_value*)(parser->globals[i].var);
|
||||||
if (!asvalue->uses && !asvalue->isconst && asvalue->expression.vtype != TYPE_FUNCTION) {
|
if (!asvalue->uses && !asvalue->isconst && asvalue->expression.vtype != TYPE_FUNCTION) {
|
||||||
retval = retval && !genwarning(ast_ctx(asvalue), WARN_UNUSED_VARIABLE,
|
if (strcmp(asvalue->name, "end_sys_globals") &&
|
||||||
"unused global: `%s`", asvalue->name);
|
strcmp(asvalue->name, "end_sys_fields"))
|
||||||
|
{
|
||||||
|
retval = retval && !genwarning(ast_ctx(asvalue), WARN_UNUSED_VARIABLE,
|
||||||
|
"unused global: `%s`", asvalue->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!ast_global_codegen(asvalue, ir)) {
|
if (!ast_global_codegen(asvalue, ir)) {
|
||||||
printf("failed to generate global %s\n", parser->globals[i].name);
|
printf("failed to generate global %s\n", parser->globals[i].name);
|
||||||
|
|
Loading…
Reference in a new issue