From 95170d57674dd3d8fd1709184493ad5994a43e57 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 22 Feb 2013 12:43:09 +0300 Subject: [PATCH] no_return: another problem with inline functions We should ignore returns from inline functions here. Signed-off-by: Dan Carpenter --- check_no_return.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_no_return.c b/check_no_return.c index 5cf76789..f4a31b01 100644 --- a/check_no_return.c +++ b/check_no_return.c @@ -14,12 +14,16 @@ static int returned; static void match_return(struct expression *ret_value) { + if (__inline_fn) + return; if (is_reachable()) returned = 1; } static void match_func_end(struct symbol *sym) { + if (__inline_fn) + return; if (!is_reachable() && !returned) sm_info("info: add to no_return_funcs"); returned = 0; -- 2.11.4.GIT