Closed Bug 836418 Opened 7 years ago Closed 7 years ago

Many instances of "warning: 'PRLogModuleInfo* getLogModule()' defined but not used" in WebRTC code, in opt builds

Categories

(Core :: WebRTC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

(Whiteboard: [WebRTC] [blocking-webrtc-] [qa-])

Attachments

(1 file)

In this Linux opt build log
 https://tbpl.mozilla.org/php/getParsedLog.php?id=19264911&tree=Try
we have 24 lines warning about getLogModule() defined but not used:
{
../../../../../media/webrtc/signaling/src/mediapipeline/SrtpFlow.cpp:19:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
../../../../../media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:46:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
../../../../../media/webrtc/signaling/src/mediapipeline/SrtpFlow.cpp:19:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
../../../../../media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp:46:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
dtlsidentity.cpp:19:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
nricectx.cpp:88:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
nricemediastream.cpp:73:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayer.cpp:17:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerice.cpp:85:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerloopback.cpp:28:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerdtls.cpp:31:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerlog.cpp:15:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerprsock.cpp:26:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
dtlsidentity.cpp:19:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
nricectx.cpp:88:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
nricemediastream.cpp:73:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerice.cpp:85:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayer.cpp:17:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerdtls.cpp:31:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerprsock.cpp:26:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerlog.cpp:15:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
transportlayerloopback.cpp:28:25: warning: 'PRLogModuleInfo* mozilla::getLogModule()' defined but not used
../../../../../media/webrtc/signaling/test/mediapipeline_unittest.cpp:39:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
../../../../media/mtransport/test/transport_unittests.cpp:41:25: warning: 'PRLogModuleInfo* getLogModule()' defined but not used
}

This is from MOZ_MTLOG_MODULE declaring that static method, in a build where the method is never called because PR_LOG is a no-op.

I think we can solve this by simply making defining MOZ_MTLOG_MODULE to do nothing in builds with PR_LOGGING disabled.
As shown here...
 https://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/include/prlog.h?mark=163-186#162
...PR_LOGGING is defined iff PR_LOG is defined to something useful.  So it's the right thing to check here.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Flags: in-testsuite-
OS: Linux → All
Hardware: x86_64 → All
Attached patch fixSplinter Review
Attachment #708236 - Flags: review?(rjesup)
Attachment #708236 - Flags: review?(rjesup) → review+
Blocks: 836570
Whiteboard: [WebRTC] [blocking-webrtc-]
https://hg.mozilla.org/mozilla-central/rev/a9b0f2dc2629
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Whiteboard: [WebRTC] [blocking-webrtc-] → [WebRTC] [blocking-webrtc-] [qa-]
You need to log in before you can comment on or make changes to this bug.