The default bug view has changed. See this FAQ.

Fix unused variable warnings in nsWifiMonitor.cpp

RESOLVED FIXED in mozilla8

Status

()

Core
Networking
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

(Blocks: 1 bug)

Trunk
mozilla8
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment, 2 obsolete attachments)

netwerk/wifi/nsWifiScannerMac.cpp:119: warning: unused variable 'rv'
netwerk/wifi/nsWifiScannerMac.cpp:255: warning: unused variable 'rv'
netwerk/wifi/nsWifiScannerUnix.cpp:213:20: warning: unused variable 'rv'

eg:

213           nsresult rv = proxy->OnChange(result, resultCount);
214           LOG( ("... sent %d\n", rv));

http://mxr.mozilla.org/mozilla-central/source/netwerk/wifi/nsWifiScannerUnix.cpp#213
http://mxr.mozilla.org/mozilla-central/source/netwerk/wifi/nsWifiScannerWin.cpp#194
http://mxr.mozilla.org/mozilla-central/source/netwerk/wifi/nsWifiScannerMac.cpp#119
http://mxr.mozilla.org/mozilla-central/source/netwerk/wifi/nsWifiScannerMac.cpp#256
http://mxr.mozilla.org/mozilla-central/source/netwerk/wifi/nsWifiScannerSolaris.cpp#217
Created attachment 540451 [details] [diff] [review]
Fix build warnings
Attachment #540451 - Flags: review?(doug.turner)

Comment 2

6 years ago
Chris, any idea if this pattern occurs enough to warrant creating some kind of LoggingOnly template?

Comment 3

6 years ago
Comment on attachment 540451 [details] [diff] [review]
Fix build warnings

Maybe we should just drop the LOG() all together.
(In reply to comment #2)
> Chris, any idea if this pattern occurs enough to warrant creating some kind
> of LoggingOnly template?

I don't know; personally, I don't run across it.  It's not something we would add to mfbt unless mfbt grew logging facilities, but something like a LoggingOnly helper doesn't need to live in mfbt.
http://dev.philringnalda.com/tbpl/?tree=Try&rev=fd911766b068

Although let me know if you'd rather me just get rid of the LOG()s.

Comment 6

6 years ago
ed, get rid of the logs.  rs+
Just the LOG("... sent %d\n", rv) variants or do you mean some/all of the others whilst I'm there? (I'm presuming the former).

All LOG()s in /netwerk/wifi/
http://mxr.mozilla.org/mozilla-central/search?string=LOG%28&case=1&find=%2Fnetwerk%2Fwifi%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central

Updated

6 years ago
Attachment #540451 - Flags: review?(doug.turner) → review-
Doug, any thoughts about comment 7? :-)
Doug?

:-)
Flags: in-testsuite-
Doug, please may I have an answer to comment 7 - I'm fairly keen to get this fairly trivial bug off my open assigned list. Thanks :-)
Doug, it's been 6 weeks, could I have a response to comment 7 please.
sorry.  my bad.

just the |LOG("... sent %d\n", rv)| ones.  The others are important when debugging.
Great, thanks Doug :-)
Summary: Fix unused variable warnings in nsWifiScanner*.cpp → Fix unused variable warnings in nsWifiMonitor.cpp
Created attachment 552951 [details] [diff] [review]
Patch v2

Bug 667535 refactored the existing code, so now less instances to change.
Carrying forwards rs+ from comment 6.
Attachment #540451 - Attachment is obsolete: true
Created attachment 552952 [details] [diff] [review]
Patch v2a

TortoiseHg being useless again (UI randomly resetting MQ included files so nothing gets qrefreshed).
Attachment #552951 - Attachment is obsolete: true
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/ec9e06287fc7
Keywords: checkin-needed
Whiteboard: [build_warning] → [build_warning][inbound]
http://hg.mozilla.org/mozilla-central/rev/96fa4289361e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
http://hg.mozilla.org/mozilla-central/rev/ec9e06287fc7
Whiteboard: [build_warning][inbound] → [build_warning]
You need to log in before you can comment on or make changes to this bug.