parseerror(parser, "expected for-loop condition");
goto onerr;
}
- }
- else if (!parser_next(parser)) {
+ } else if (!parser_next(parser)) {
parseerror(parser, "expected for-loop condition");
goto onerr;
}
if (!cond)
goto onerr;
}
-
/* move on to incrementor */
if (parser->tok != ';') {
parseerror(parser, "expected semicolon after for-loop initializer");
if (!ast_istype(it, ast_value))
continue;
asvalue = (ast_value*)it;
- if (!asvalue->m_uses && !asvalue->m_hasvalue && 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);
}