Bug 127647

Summary: JavaScriptCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, joepeck, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix andersca: review+

Description Joseph Pecoraro 2014-01-26 01:11:36 PST
This should go through a careful review. I don't think anything is controversial here.

I can already see that engineers might want to include a comment with a FALLTHROUGH.

For example:

    // fall through to Foo

Could become:

    FALLTHROUGH; // To Foo.

In the first patch I only left comments that seemed most apt to keep.

Also filed a clang issue to make FALLTHROUGH nicer to use in the case and there are labels preceding the next case:
http://llvm.org/bugs/show_bug.cgi?id=18621
Comment 1 Joseph Pecoraro 2014-01-26 01:14:14 PST
Created attachment 222265 [details]
[PATCH] Proposed Fix

Again, reviewers look carefully. This may have uncovered a latent bug with an accidental fallthrough.
Comment 2 Joseph Pecoraro 2014-01-26 02:42:14 PST
Created attachment 222268 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2014-01-27 20:01:13 PST
Landed <http://trac.webkit.org/changeset/162906>.