Closed Bug 1125665 Opened 10 years ago Closed 10 years ago

Fix -Wunused-private-field warning in PLDHashTable and mark xpcom/glue as FAIL_ON_WARNINGS

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

PLDHashTable has a private member variable mRecursionLevel that is only used #ifdef DEBUG, but mRecursionLevel is still declared in release builds to avoid binary compat problems if the struct padding changes. clang warns that mRecursionLevel is unused. This patch works around clang's warning by declaring mRecursionLevel as protected, so the compiler can't assume that some derived class might use mRecursionLevel. Green Try build with xpcom/glue FAIL_ON_WARNINGS: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ae465d9f9631
Attachment #8554317 - Flags: review?(nfroyd)
Attachment #8554317 - Flags: review?(nfroyd) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: