Print this page
12166 resync smatch to 0.6.1-rc1-il-3
*** 27,57 ****
static int my_id;
STATE(freed);
STATE(ignore);
- STATE(param);
static void set_ignore(struct sm_state *sm, struct expression *mod_expr)
{
set_state(my_id, sm->name, sm->sym, &ignore);
}
- static void match_function_def(struct symbol *sym)
- {
- struct symbol *arg;
- int i;
-
- i = -1;
- FOR_EACH_PTR(sym->ctype.base_type->arguments, arg) {
- i++;
- if (!arg->ident)
- continue;
- set_state(my_id, arg->ident->name, arg, ¶m);
- } END_FOR_EACH_PTR(arg);
- }
-
static void freed_variable(struct expression *expr)
{
struct sm_state *sm;
expr = strip_expr(expr);
--- 27,42 ----
*** 109,120 ****
if (option_project == PROJ_KERNEL) {
/* The kernel uses check_frees_param_strict.c */
return;
}
- add_hook(&match_function_def, FUNC_DEF_HOOK);
-
add_function_hook("free", &match_free, INT_PTR(0));
select_return_implies_hook(PARAM_FREED, &set_param_freed);
add_modification_hook(my_id, &set_ignore);
--- 94,103 ----