This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sprinkle NOTREACHED and FALLTHROUGH
authorDavid Mitchell <davem@iabyn.com>
Thu, 5 Mar 2015 11:44:37 +0000 (11:44 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 5 Mar 2015 11:51:17 +0000 (11:51 +0000)
commit2b5060aeb95612aea17de446e9d72793e28bf8a9
tree74f80e0051d4dfeec8379bc455486654ab7c43cf
parent010725738074e6477ae945076c10bb2d2042390d
sprinkle NOTREACHED and FALLTHROUGH

Coverity complains bitterly about many switch statements in lots of files.

Many of these are of the form:

    case FOO:
        ...
        goto baz;
    case BAR:
        ....

and something as smart as Coverity shouldn't really be complaining about
a missing 'break' when the last statement of the previous branch is an
unconditional goto/return/continue. But I've shoved in a bunch of
'NOTREACHED' to hopefully shut it up.

Missing 'FALLTHROUGH' comments were more reasonable, and I've added them
where appropriate.

The only confusing one was cx_dup(), where the various CXt_LOOP_ branches
all fell through to the next one, and it took a while to figure out that
those weren't bugs.
dump.c
ext/B/B.pm
ext/B/B.xs
op.c
perl.c
sv.c