From: Juha-Pekka Heikkila Date: Wed, 2 Apr 2014 13:13:59 +0000 (+0300) Subject: mesa: remove redundant running of check_symbol_table() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f641b2d5025a4306c6e5f9d639def4061f69667;p=mesa.git mesa: remove redundant running of check_symbol_table() 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 Reviewed-by: Matt Turner --- diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c index 2f41322f60e..9462978ee4d 100644 --- a/src/mesa/program/symbol_table.c +++ b/src/mesa/program/symbol_table.c @@ -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