Closed Bug 1236413 Opened 8 years ago Closed 8 years ago

Suppress -Wimplicit-fallthrough warning in third-party code mfbt/decimal/

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

clang's -Wimplicit-fallthrough warnings (not yet enabled in mozilla-central) warn about switch cases that fall through without a break or return statement. MOZ_FALLTHROUGH (bug 1215411) is an annotation to suppress -Wimplicit-fallthrough warnings where the fallthrough is intentional.

Decimal.cpp is third-party code imported from Blink, so we can either suppress the warning in moz.build or apply a local patch (adding a MOZ_FALLTHROUGH annotation).

This -Wimplicit-fallthrough warning has actually been fixed in Blink's upstream Decimal.cpp. I tried updating our Decimal.cpp snapshot and reapplying our in-tree patches, but there were some merge conflicts from upstream changes I didn't understand well enough to resolve confidently.

mfbt/decimal/Decimal.cpp:762:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
Attachment #8703495 - Flags: review?(jwalden+bmo)
Attachment #8703495 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/deba095103f3
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Blocks: 1253170
You need to log in before you can comment on or make changes to this bug.