check_missing_break.c (1f5207b7) check_missing_break.c (efe51d0c)
1/*
2 * Copyright (C) 2013 Oracle.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 163 unchanged lines hidden (view full) ---

172
173void check_missing_break(int id)
174{
175 my_id = id;
176
177 if (!option_spammy)
178 return;
179
1/*
2 * Copyright (C) 2013 Oracle.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 163 unchanged lines hidden (view full) ---

172
173void check_missing_break(int id)
174{
175 my_id = id;
176
177 if (!option_spammy)
178 return;
179
180 set_dynamic_states(my_id);
180 add_unmatched_state_hook(my_id, &unmatched_state);
181 add_merge_hook(my_id, &merge_hook);
182
183 add_hook(&match_assign, ASSIGNMENT_HOOK);
184 add_hook(&match_symbol, SYM_HOOK);
185 add_hook(&match_stmt, STMT_HOOK);
186 add_hook(&match_switch, STMT_HOOK);
187 add_hook(&match_switch_end, STMT_HOOK_AFTER);
188}
181 add_unmatched_state_hook(my_id, &unmatched_state);
182 add_merge_hook(my_id, &merge_hook);
183
184 add_hook(&match_assign, ASSIGNMENT_HOOK);
185 add_hook(&match_symbol, SYM_HOOK);
186 add_hook(&match_stmt, STMT_HOOK);
187 add_hook(&match_switch, STMT_HOOK);
188 add_hook(&match_switch_end, STMT_HOOK_AFTER);
189}