mesa: remove redundant running of check_symbol_table()
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Wed, 2 Apr 2014 13:13:59 +0000 (16:13 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 2 Apr 2014 16:54:37 +0000 (19:54 +0300)
Nested for loops running through tables against which they
finally do an assert were ran also with optimized builds.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/program/symbol_table.c

index 2f41322f60ea62b4d3017e1b9f91f5d467886df3..9462978ee4df6bbacc04534f0d4e657048da1b66 100644 (file)
@@ -115,7 +115,7 @@ struct _mesa_symbol_table {
 static void
 check_symbol_table(struct _mesa_symbol_table *table)
 {
-#if 1
+#if !defined(NDEBUG)
     struct scope_level *scope;
 
     for (scope = table->current_scope; scope != NULL; scope = scope->next) {
@@ -134,7 +134,9 @@ check_symbol_table(struct _mesa_symbol_table *table)
             }
         }
     }
-#endif
+#else
+    (void) table;
+#endif /* !defined(NDEBUG) */
 }
 
 void