unreachable: don't print a warning if we jump to the middle of a loop
commit3404891cd4ca72c8b379dd1d1b66598afb1a5a8c
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Apr 2014 21:54:08 +0000 (26 00:54 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Apr 2014 21:54:08 +0000 (26 00:54 +0300)
tree9f5cd136c89769a80eafd470baedcafde00ee711
parente2e54176d336c1b1a2b3a235aa3e80826eb03a43
unreachable: don't print a warning if we jump to the middle of a loop

There is a some code like this:

goto first;

for (;;) {
XXX_frob();
first:
more_frob();
}

Smatch sees the start of the for loop as unreachable.  There isn't really
a good way to fix this so I just ignore any unreachable loops if they are
preceded by a goto.  It's not beautiful, but it's better to not print
false positives.

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