Bug 129220 - Remove some unreachable code (-Wunreachable-code)
Summary: Remove some unreachable code (-Wunreachable-code)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-22 16:51 PST by Joseph Pecoraro
Modified: 2014-02-22 17:32 PST (History)
17 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (9.64 KB, patch)
2014-02-22 16:53 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-02-22 16:51:22 PST
Remove some straightforward cases of unreachable code. I believe these are all break statements that have a return, goto, or another break immediately preceding them.

It may not be possible to enable -Wunreachable-code by default. There are many places where we have code after CRASH() / NO_RETURN functions, return values after switches that return for all possible values, code that compiles differently on 32/64bit that statically eliminate branches (if sizeof(...)), debug only code enabled/disabled by static booleans that are false, and more. I did file some bugs on real cases of unreachable code that this caught; nothing significant.
Comment 1 Joseph Pecoraro 2014-02-22 16:53:52 PST
Created attachment 224985 [details]
[PATCH] Proposed Fix
Comment 2 WebKit Commit Bot 2014-02-22 17:32:45 PST
Comment on attachment 224985 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 224985

Committed r164553: <http://trac.webkit.org/changeset/164553>
Comment 3 WebKit Commit Bot 2014-02-22 17:32:48 PST
All reviewed patches have been landed.  Closing bug.