Closed
Bug 1235234
Opened 9 years ago
Closed 9 years ago
Fix unintentional switch fallthrough in ipc/chromium/ found by -Wimplicit-fallthrough warning
Categories
(Core :: Security: Process Sandboxing, defect)
Core
Security: Process Sandboxing
Tracking
()
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
1023 bytes,
patch
|
gcp
:
review+
|
Details | Diff | Splinter Review |
ipc/chromium/src/base/process_util_mac.mm:132:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
This patch fixes a clang -Wimplicit-fallthrough warning (not yet enabled by default in mozilla-central) about switch cases that fall through without a break or return statement. Warnings about intentional fallthroughs can be suppressed with MOZ_FALLTHROUGH, a MFBT macro for a clang compiler annotation. 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;
}
Attachment #8702096 -
Flags: review?(gpascutto)
Comment 1•9 years ago
|
||
Comment on attachment 8702096 [details] [diff] [review]
ipc_MOZ_FALLTHROUGH.patch
Review of attachment 8702096 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not sure describing this as fixing a warning is appropriate. The code is 100% buggy and the warning caught it. Can you check whether upstream is fixed?
Attachment #8702096 -
Flags: review?(gpascutto) → review+
Assignee | ||
Comment 2•9 years ago
|
||
(In reply to Gian-Carlo Pascutto [:gcp] from comment #1)
> I'm not sure describing this as fixing a warning is appropriate. The code is
> 100% buggy and the warning caught it. Can you check whether upstream is
> fixed?
This function is not in the upstream process_util_mac.mm. It's a local change in mozilla-central:
https://hg.mozilla.org/mozilla-central/rev/e45446b74099
Blocks: 590057
Assignee | ||
Comment 4•9 years ago
|
||
I corrected the commit message and bug summary to mention the bug fix instead of just a warning fix.
status-firefox46:
--- → fixed
Summary: Fix -Wimplicit-fallthrough warning in ipc/chromium/ → Fix unintentional switch fallthrough in ipc/chromium/ found by -Wimplicit-fallthrough warning
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•