projects
/
xonotic
/
gmqcc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b94d75
)
Don't generate unused warnings for unused constants
author
Dale Weiler <weilercdale@gmail.com>
Sat, 19 Nov 2016 11:46:32 +0000
(11:46 +0000)
committer
Dale Weiler <weilercdale@gmail.com>
Sat, 19 Nov 2016 11:46:32 +0000
(11:46 +0000)
parser.cpp
patch
|
blob
|
history
diff --git
a/parser.cpp
b/parser.cpp
index dbf70f4a9a8ff2bbe94525ee2e97940b7db5efeb..004d374024ec615787b072479cde0f77a5e606ae 100644
(file)
--- a/
parser.cpp
+++ b/
parser.cpp
@@
-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);
}