Fix walk_statement(): Walk the expression(s) of case labels, too.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 20 Apr 2012 18:14:23 +0000 (20:14 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 24 Apr 2012 12:51:58 +0000 (14:51 +0200)
walk.c

diff --git a/walk.c b/walk.c
index 6162229..1b88790 100644 (file)
--- a/walk.c
+++ b/walk.c
@@ -327,6 +327,11 @@ static void walk_statement(statement_t *const stmt, const walk_env_t *const env)
                return;
 
        case STATEMENT_CASE_LABEL:
+               if (stmt->case_label.expression) {
+                       walk_expression(stmt->case_label.expression, env);
+                       if (stmt->case_label.end_range)
+                               walk_expression(stmt->case_label.end_range, env);
+               }
                walk_statement(stmt->case_label.statement, env);
                return;