flow: hide a bunch of the unreachable warnings under the --spammy flag
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Dec 2013 11:29:34 +0000 (20 14:29 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Dec 2013 11:29:34 +0000 (20 14:29 +0300)
There are still too many of the warnings.  There is a place in
smatch_states.c which still prints them when ever a state is set on an
unreachable path.  With the current versions of Smatch we set a lot of
states so that happens very often...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_flow.c

index ad1f2dc..dad2f5c 100644 (file)
@@ -526,6 +526,8 @@ static void print_unreached(struct statement *stmt)
        }
        if (empty_statement(stmt))
                return;
+       if (!option_spammy)
+               return;
        sm_msg("info: ignoring unreachable code.");
        print = 0;
 }