Closed
Bug 1240264
Opened 9 years ago
Closed 9 years ago
Annotate intentional switch fallthroughs in dom/media/
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
(deleted),
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
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.
MOZ_FALLTHROUGH_ASSERT will suppress -Wimplicit-fallthrough warnings about switch cases that MOZ_ASSERT(false) (or its alias MOZ_ASSERT_UNREACHABLE) in debug builds, but intentionally fall through in release builds. Without MOZ_FALLTHROUGH_ASSERT, release builds will fail with -Wimplicit-fallthrough without a MOZ_FALLTHROUGH, but debug builds will fail with -Wunreachable-code warnings about the MOZ_ASSERT(false) prevents the MOZ_FALLTHROUGH from being reached. The MOZ_FALLTHROUGH_ASSERT macro breaks this warning stalemate.
dom/media/MediaManager.cpp:1905:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/media/webm/WebMBufferedParser.cpp:133:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
Attachment #8708661 -
Flags: review?(cpearce)
Updated•9 years ago
|
Attachment #8708661 -
Flags: review?(cpearce) → review+
Comment 2•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•