]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Sanity check for -Wternary-precedence
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 1 Dec 2012 11:36:54 +0000 (12:36 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 1 Dec 2012 11:36:54 +0000 (12:36 +0100)
parser.c

index 24d0fcebf2950af4bee9980397d4b667b94b7302..d2c8bffe8aa28ec5f66dfb97f2024ae114e9412e 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1718,6 +1718,11 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
     vec_free(sy.out);
     vec_free(sy.ops);
     DEBUGSHUNTDO(con_out("shunt done\n"));
+    if (vec_size(parser->pot)) {
+        parseerror(parser, "internal error: vec_size(parser->pot) = %lu", (unsigned long)vec_size(parser->pot));
+        return NULL;
+    }
+    vec_free(parser->pot);
     return expr;
 
 onerr: