2 * smatch/check_no_return.c
4 * Copyright (C) 2010 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
15 static void match_return(struct expression
*ret_value
)
21 static int function_is_static()
23 if (cur_func_sym
->ctype
.modifiers
& MOD_STATIC
)
28 static void match_func_end(struct symbol
*sym
)
30 if (!function_is_static() && !is_reachable() && !returned
)
31 sm_info("info: add to no_return_funcs");
35 void check_no_return(int id
)
40 add_hook(&match_return
, RETURN_HOOK
);
41 add_hook(&match_func_end
, END_FUNC_HOOK
);