Closed Bug 836196 Opened 11 years ago Closed 11 years ago

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

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 825105

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug, )

Details

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

Attachments

(1 file, 1 obsolete file)

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.
}
Attached patch fix (obsolete) — Splinter Review
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
Whiteboard: [WebRTC] [blocking-webrtc-]
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.
Attached patch fix v2Splinter Review
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
Closed: 11 years ago
Resolution: --- → DUPLICATE
Attachment #710431 - Flags: review?(ekr)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: