Closed
Bug 997026
Opened 10 years ago
Closed 10 years ago
Fix clang -Wunused-const-variable warnings in xpcom
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(2 files)
2.18 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
1.18 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
xpcom/glue/nsID.cpp:9:19 [-Wunused-const-variable] unused variable 'gIDFormat' xpcom/glue/nsID.cpp:12:19 [-Wunused-const-variable] unused variable 'gIDFormat2' xpcom/glue/nsVoidArray.cpp:20:22 [-Wunused-const-variable] unused variable 'kAutoClearCompactSizeFactor' gIDFormat and gIDFormat2 are only used #ifndef XPCOM_GLUE_AVOID_NSPR: https://hg.mozilla.org/mozilla-central/annotate/dd50745d7f35/xpcom/glue/nsID.cpp#l88
Attachment #8407338 -
Flags: review?(nfroyd)
Assignee | ||
Comment 1•10 years ago
|
||
startupcache/StartupCache.cpp:89:22 [-Wunused-const-variable] unused variable 'kZipReaderCID'
Attachment #8407340 -
Flags: review?(nfroyd)
Updated•10 years ago
|
Attachment #8407340 -
Flags: review?(nfroyd) → review+
Comment 2•10 years ago
|
||
Comment on attachment 8407338 [details] [diff] [review] fix_xpcom_Wunused-const-variable.patch Review of attachment 8407338 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the changes below. ::: xpcom/glue/nsID.cpp @@ +6,5 @@ > #include "nsID.h" > #include "prprf.h" > #include "nsMemory.h" > > +#ifndef XPCOM_GLUE_AVOID_NSPR Can you just move this whole block down to the existing #ifndef block, please? That will make it a whole lot easier to see what's going on. gIDFormat2 appears to be unused regardless, can you delete that while you're at it? @@ +12,1 @@ > static const char gIDFormat[] = Please nuke the trailing whitespace here too.
Attachment #8407338 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Landed with recommended changes: * Moved gIDFormat definition * Removed unused gIDFormat2 * Removed trailing whitespace https://hg.mozilla.org/integration/mozilla-inbound/rev/1a3585a1b4a5 https://hg.mozilla.org/integration/mozilla-inbound/rev/2bfdbce8d055
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1a3585a1b4a5 https://hg.mozilla.org/mozilla-central/rev/2bfdbce8d055
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•