2 * sparse/smatch_project.c
4 * Copyright (C) 2010 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
11 * This file is only for very generic stuff, that is reusable
12 * between projects. If you need something special create a
13 * check_your_project.c.
19 static void register_no_return_funcs(void)
23 static char name
[256];
26 snprintf(name
, 256, "%s.no_return_funcs", option_project_str
);
28 token
= get_tokens_file(name
);
31 if (token_type(token
) != TOKEN_STREAMBEGIN
)
34 while (token_type(token
) != TOKEN_STREAMEND
) {
35 if (token_type(token
) != TOKEN_IDENT
)
37 func
= show_ident(token
->ident
);
38 add_function_hook(func
, &__match_nullify_path_hook
, NULL
);
44 void register_project(int id
)
46 if (option_project
!= PROJ_KERNEL
)
47 add_function_hook("exit", &__match_nullify_path_hook
, NULL
);
48 register_no_return_funcs();