Closed Bug 927209 Opened 6 years ago Closed 6 years ago

Fix -Wunused-function and -Wreorder warnings in security/manager/ssl/src/nsNSSIOLayer.cpp

Categories

(Core :: Security: PSM, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla27
Tracking Status
firefox26 --- unaffected
firefox27 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [qa-])

Attachments

(1 file)

These two build warnings are regressions from bug 839310:

security/manager/ssl/src/nsNSSIOLayer.cpp:77:1 [-Wunused-function] unused function 'getSiteKey'
security/manager/ssl/src/nsNSSIOLayer.cpp:1208:3 [-Wreorder] field 'mutex' will be initialized after field 'mRenegoUnrestrictedSites'


Bug 839310 added two overloads of function getSiteKey(), but only called one. Rather than remove the unused function [1], this patch changes one of the call sites to call the unused function because it simplifies the code.

[1] https://hg.mozilla.org/integration/mozilla-inbound/annotate/5db1f111ac19/security/manager/ssl/src/nsNSSIOLayer.cpp#l77
Attachment #817533 - Flags: review?(brian)
Comment on attachment 817533 [details] [diff] [review]
fix-nsNSSIOLayer-warnings.patch

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

Please revert the getSiteKey() call and remove the unused variant. I intentionally wanted to remove the dependency on nsNSSSocketInfo.
Attachment #817533 - Flags: review?(brian) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/19caec7fe32d
Assignee: nobody → cpeterson
Severity: normal → minor
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/19caec7fe32d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.