Closed Bug 1008286 Opened 10 years ago Closed 10 years ago

clang warning (treated as error) in disable-unified build: nsProtocolProxyService.cpp:666:12: error: unused variable 'kProxyType_UNKNOWN' [-Werror,-Wunused-const-variable]

Categories

(Core :: Networking, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STR:
Build with this mozconfig, with clang (I'm using version 3.5):
 ac_add_options --enable-debug --disable-optimize
 ac_add_options --enable-warnings-as-errors
 ac_add_options --disable-unified-compilation

ACTUAL RESULTS:
Build error:
netwerk/base/src/nsProtocolProxyService.cpp:666:12: error: unused variable 'kProxyType_UNKNOWN' [-Werror,-Wunused-const-variable]

This variable is indeed unused and should be removed.

(I think clang doesn't warn about it in unified builds because there, we're #including the .cpp file, and clang assumes that there could be other #includers that have usages.)
Attached patch fix v1Splinter Review
Attachment #8420227 - Flags: review?(jduell.mcbugs)
MXR search proving that this variable is indeed unused:
 http://mxr.mozilla.org/mozilla-central/search?string=kProxyType_UNKNOWN
Attachment #8420227 - Flags: review?(jduell.mcbugs) → review+
Keywords: checkin-needed
Thanks for the review! I'll land this myself in a bit; no need for checkin-needed.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2401ac3b2a9b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
See Also: → 1032644
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: