nricemediastream.h:136:13: warning: private field 'components_' is not used [-Wunused-private-field] (and similar in nricectx.h)

RESOLVED DUPLICATE of bug 825105

Status

()

Core
WebRTC
RESOLVED DUPLICATE of bug 825105
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [WebRTC] [blocking-webrtc-], URL)

Attachments

(1 attachment, 1 obsolete attachment)

Build warning on Mac OS X:
{
In file included from nricemediastream.cpp:69:
../../../../media/mtransport/nricemediastream.h:136:13: warning: private field 'components_' is not used [-Wunused-private-field]
  const int components_;
            ^
1 warning generated.
In file included from nricectx.cpp:82:
../../../../media/mtransport/nricectx.h:231:8: warning: private field 'offerer_' is not used [-Wunused-private-field]
  bool offerer_;
       ^
1 warning generated.
}
Sample log w/ these warnings: https://tbpl.mozilla.org/php/getParsedLog.php?id=19265538&tree=Try
Created attachment 708004 [details] [diff] [review]
fix

In both cases, the parameter in question is used elsewhere in the ::Create() method, but the version of it that's stored as member-data is never used, so that one can be dropped.
Attachment #708004 - Flags: review?(ekr)
Blocks: 836570

Updated

5 years ago
Whiteboard: [WebRTC] [blocking-webrtc-]

Comment 3

5 years ago
Comment on attachment 708004 [details] [diff] [review]
fix

Review of attachment 708004 [details] [diff] [review]:
-----------------------------------------------------------------

I'd prefer to keep these fields around. They're useful for debugging and may some day appear in log messages.
Created attachment 710431 [details] [diff] [review]
fix v2

OK -- given that, we probably want to just silence the warning messages by 'using' these variables w/ unused<<.

Also, as an optimization: we can presumably mark these as DebugOnly, since they don't do us any good in opt builds. (and there's no use allocating space for them at in opt builds if they're only there for debugging purposes)

(You mentioned that we might want to include these in logging someday -- if we do that in opt builds, then we could remove DebugOnly at that point; but for now, we don't need these variables in opt builds)
Attachment #708004 - Attachment is obsolete: true
Attachment #708004 - Flags: review?(ekr)
Attachment #710431 - Flags: review?(ekr)
Looks like bug 825105 just silenced these warnings w/ (void) casts. Duping to that bug, and canceling review request.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 825105
Attachment #710431 - Flags: review?(ekr)
You need to log in before you can comment on or make changes to this bug.