Closed Bug 1217726 Opened 4 years ago Closed 4 years ago

Fix -Wimplicit-fallthrough warnings in dom/plugins

Categories

(Core :: Plug-ins, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

MOZ_FALLTHROUGH is an annotation to suppress clang's -Wimplicit-fallthrough warnings about switch cases that fall through without a break or return statement. MOZ_FALLTHROUGH is only needed on cases that have code:

switch (foo) {
  case 1: // These cases have no code. No fallthrough annotations are needed.
  case 2:
  case 3:
    foo = 4; // This case has code, so a fallthrough annotation is needed:
    MOZ_FALLTHROUGH;
  default:
    return foo;
}

dom/plugins/base/nsNPAPIPlugin.cpp:1974:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/plugins/base/nsNPAPIPlugin.cpp:2200:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/plugins/ipc/PluginInstanceChild.cpp:507:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
Attachment #8677927 - Flags: review?(jmathies)
Attachment #8677927 - Flags: review?(jmathies) → review+
Landed a few hours ago - https://hg.mozilla.org/mozilla-central/rev/59f041348904
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Blocks: 1253170
You need to log in before you can comment on or make changes to this bug.