2 * sparse/smatch_tracker.c
4 * Copyright (C) 2009 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
12 static struct tracker_list
*ignored
;
14 void add_ignore(int owner
, const char *name
, struct symbol
*sym
)
18 tmp
= malloc(sizeof(*tmp
));
19 tmp
->name
= alloc_string(name
);
22 add_ptr_list(&ignored
, tmp
);
25 int is_ignored(int owner
, const char *name
, struct symbol
*sym
)
29 FOR_EACH_PTR(ignored
, tmp
) {
30 if (tmp
->owner
== owner
&& tmp
->sym
== sym
31 && !strcmp(tmp
->name
, name
))
33 } END_FOR_EACH_PTR(tmp
);
37 static void clear_ignores(void)
39 __free_ptr_list((struct ptr_list
**)&ignored
);
42 void register_smatch_ignore(int id
)
44 add_hook(&clear_ignores
, END_FUNC_HOOK
);