mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 12:00:38 +00:00
Don't generate unused warnings for unused constants
This commit is contained in:
parent
0b94d7583c
commit
6938567c6c
1 changed files with 1 additions and 1 deletions
|
@ -6226,7 +6226,7 @@ bool parser_finish(parser_t *parser, const char *output)
|
|||
if (!ast_istype(it, ast_value))
|
||||
continue;
|
||||
asvalue = (ast_value*)it;
|
||||
if (!asvalue->m_uses && asvalue->m_vtype != TYPE_FUNCTION) {
|
||||
if (!asvalue->m_uses && asvalue->m_cvq != CV_CONST && asvalue->m_vtype != TYPE_FUNCTION) {
|
||||
retval = retval && !compile_warning(asvalue->m_context, WARN_UNUSED_VARIABLE,
|
||||
"unused global: `%s`", asvalue->m_name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue