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)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
9.21 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
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)
Comment 1•10 years ago
|
||
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+
Assignee | ||
Comment 2•10 years ago
|
||
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
No longer blocks: FAIL_ON_WARNINGS
status-firefox32:
--- → wontfix
Comment 3•10 years ago
|
||
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.
Description
•