From ef15ecba0ed25ef32cdd31fe07ff564faba14a6f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 19 Dec 2013 18:20:45 +0300 Subject: [PATCH] unreachable code: don't warn about empty statements This is when people add extra semi-colons like: return 0;; Or: switch (foo) { ... }; These warnings were only enabled with --spammy but it's better to use coccinelle for these. Signed-off-by: Dan Carpenter --- smatch_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_flow.c b/smatch_flow.c index 89fc4b81..3532bfc4 100644 --- a/smatch_flow.c +++ b/smatch_flow.c @@ -522,7 +522,7 @@ static void print_unreached(struct statement *stmt) default: break; } - if (!option_spammy && empty_statement(stmt)) + if (empty_statement(stmt)) return; sm_msg("info: ignoring unreachable code."); print = 0; -- 2.11.4.GIT