Closed Bug 1032644 Opened 10 years ago Closed 10 years ago

Fix some -Wunused warnings in non-unified OS X build

Categories

(Core :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33
Tracking Status
firefox32 --- wontfix
firefox33 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Fix some -Wunused clang warnings when building in non-unified mode with -O3 (and mark some of these directories as FAIL_ON_WARNINGS). clang seems do a better job of reporting -Wunused warnings when building in non-unified mode (and -O3 also helps): > caps/src/nsScriptSecurityManager.cpp:74:22 [-Wunused-const-variable] unused variable 'kZipReaderCID' > extensions/spellcheck/hunspell/src/mozHunspell.cpp:82:22 [-Wunused-const-variable] unused variable 'kUnicharUtilCID' > extensions/spellcheck/src/mozPersonalDictionary.cpp:24:11 [-Wunused-const-variable] unused variable 'kMaxWordLen' > extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.cpp:18:22 [-Wunused-const-variable] unused variable 'kUniversalDetectorCID' > extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.cpp:19:22 [-Wunused-const-variable] unused variable 'kUniversalStringDetectorCID' > parser/html/nsParserUtils.cpp:48:22 [-Wunused-const-variable] unused variable 'kCParserCID' > toolkit/xre/nsSigHandlers.cpp:44:18 [-Wunused-const-variable] unused variable 'kClientChannelFd' The caps/src/ directory can't FAIL_ON_WARNINGS for MSVC yet because of warnings about inconsistent dll linkage in bug 1032641. Ehsan removed some these unused variables in changeset [1], but that changeset was quickly backed out in [2]. My less ambitious patch builds correctly in Try [3]. [1] https://hg.mozilla.org/mozilla-central/rev/a73ffb0d0c97 [2] https://hg.mozilla.org/mozilla-central/rev/64e2f1061cde [3] https://tbpl.mozilla.org/?tree=Try&rev=a37ed6949fc5
Attachment #8448481 - Flags: review?(ehsan)
Depends on: 1032641
Comment on attachment 8448481 [details] [diff] [review] fix-non-unified-warnings.patch Review of attachment 8448481 [details] [diff] [review]: ----------------------------------------------------------------- r=me on everything except for the hunk below. ::: caps/src/moz.build @@ +26,5 @@ > + > +if CONFIG['_MSC_VER']: > + CXXFLAGS += [ > + '-wd4273', # 'JSPrincipals::dump' : inconsistent dll linkage > + ] I don't think we should just disable this warning, can we fix it? Or move this to bug 1032641?
Attachment #8448481 - Flags: review?(ehsan) → review+
I reverted the warning suppression, as you suggested. If we suppress the warning, no one will ever fix it. :) https://hg.mozilla.org/integration/mozilla-inbound/rev/ed0d0844967e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: