Closed Bug 1260153 Opened 8 years ago Closed 8 years ago

Fix unreachable code warning in nsMixedContentBlocker

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: ckerschb, Assigned: tanvi)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

0:05.35 Warning: -Wunreachable-code in /home/ckerschb/moz/mc/dom/security/nsMixedContentBlocker.cpp: will never be executed
 0:05.35 /home/ckerschb/moz/mc/dom/security/nsMixedContentBlocker.cpp:914:16: warning: will never be executed [-Wunreachable-code]
 0:05.35   *aDecision = REJECT_REQUEST;
 0:05.35                ^~~~~~~~~~~~~~
 0:05.35 1 warning generated.
Whiteboard: [domsecurity-backlog]
We can remove lines 914 and 915: http://mxr.mozilla.org/mozilla-central/source/dom/security/nsMixedContentBlocker.cpp#914
Assignee: nobody → tanvi
Attached patch Bug1260153.patchSplinter Review
Attachment #8735544 - Flags: review?(mozilla)
Comment on attachment 8735544 [details] [diff] [review]
Bug1260153.patch

Review of attachment 8735544 [details] [diff] [review]:
-----------------------------------------------------------------

Obviously the right solution would be to fix nsMixedContentBlocker::ShouldLoad() to use early returns and eliminate some of that if-else spaghetti code. In order to suppress the warning though it's fine to land that change, r=me. Thanks!
Attachment #8735544 - Flags: review?(mozilla) → review+
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-backlog] → [domsecurity-active]
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4c3f6045b281
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.