Closed
Bug 964075
Opened 11 years ago
Closed 11 years ago
clang build warning: xpcom/components/nsComponentManager.cpp:99:12: warning: unused variable 'classIDKeyName' [-Wunused-const-variable], and many more
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
5.88 KB,
text/plain
|
Details | |
2.49 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Clang 3.4 and 3.5 (at least) have a warning for "-Wunused-const-variable". (Apparently earlier compilers don't warn about unused variables if they're const, or something, but clang now does.)
We hit a bunch of instances of this in nsComponentManager.cpp, starting with:
{
0:28.44 Warning: -Wunused-const-variable in /mozilla-central/xpcom/components/nsComponentManager.cpp: unused variable 'classIDKeyName'
0:28.44 /mozilla-central/xpcom/components/nsComponentManager.cpp:99:12: warning: unused variable 'classIDKeyName' [-Wunused-const-variable]
0:28.44 const char classIDKeyName[]="classID";
0:28.44 ^
}
I'm attaching a text file with the rest, since the lines are all a bit long and they would look ugly in a bugzilla comment.
Assignee | ||
Comment 1•11 years ago
|
||
Note: it looks like ehsan fixed some of these back in
http://hg.mozilla.org/mozilla-central/rev/a73ffb0d0c97#l26.1
but hit build bustage and backed out in
http://hg.mozilla.org/mozilla-central/rev/64e2f1061cde
Assignee | ||
Updated•11 years ago
|
Summary: clang build warning: xpcom/components/nsComponentManager.cpp:99:12: warning: unused variable 'classIDKeyName' [-Wunused-const-variable] → clang build warning: xpcom/components/nsComponentManager.cpp:99:12: warning: unused variable 'classIDKeyName' [-Wunused-const-variable], and many more
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dholbert
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8365701 -
Flags: review?(benjamin)
Assignee | ||
Comment 3•11 years ago
|
||
Green try run: https://tbpl.mozilla.org/?tree=Try&rev=fe152d3d112c (aside from one unrelated 'make check' test-failure)
Comment 4•11 years ago
|
||
Comment on attachment 8365701 [details] [diff] [review]
fix v1
Review of attachment 8365701 [details] [diff] [review]:
-----------------------------------------------------------------
Stealing review. Getting rid of unused things is uncontroversial.
Attachment #8365701 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Flags: in-testsuite-
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•