]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.cpp
Fix ent.vec.{x,y,z} writes
[xonotic/gmqcc.git] / parser.cpp
index df1715c53f2709371aeadb62af7810460b97f1d8..dbf70f4a9a8ff2bbe94525ee2e97940b7db5efeb 100644 (file)
@@ -2523,8 +2523,7 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
             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;
     }
@@ -2535,7 +2534,6 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
         if (!cond)
             goto onerr;
     }
-
     /* move on to incrementor */
     if (parser->tok != ';') {
         parseerror(parser, "expected semicolon after for-loop initializer");
@@ -6228,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_hasvalue && asvalue->m_vtype != TYPE_FUNCTION) {
+        if (!asvalue->m_uses && asvalue->m_vtype != TYPE_FUNCTION) {
             retval = retval && !compile_warning(asvalue->m_context, WARN_UNUSED_VARIABLE,
                                                 "unused global: `%s`", asvalue->m_name);
         }