Closed Bug 1303411 Opened 3 years ago Closed 3 years ago

VideoConduit.cpp:747:26: warning: '&&' within '||' [-Wlogical-op-parentheses]

Categories

(Core :: WebRTC: Audio/Video, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

I get the following build warning (from clang 3.8) when building mozilla-central:
{
 4:48.69 ../../../../../mozilla/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:747:26: warning: '&&' within '||' [-Wlogical-op-parentheses]
 4:48.69   if (mExternalSendCodec && codecConfig->mType == mExternalSendCodec->mType
 4:48.69       ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4:48.69 ../../../../../mozilla/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:747:26: note: place parentheses around the '&&' expression to silence this warning
 4:48.70   if (mExternalSendCodec && codecConfig->mType == mExternalSendCodec->mType
 4:48.70                          ^
 4:48.70       (                                                                    )
}

This is in code that was added in bug 1297058.

Easy to address -- we just need to add some parens to make the grouping a bit more human-readably-explicity.
Assignee: nobody → dholbert
> more human-readably-explicity

er, meant to say "human-readably-explicit" :)
Comment on attachment 8792069 [details]
Bug 1303411: Add parens to some logic in VideoConduit.cpp, to address clang -Wlogical-op-parentheses build warning.

https://reviewboard.mozilla.org/r/79294/#review77856

Thanks, that was on my todo list :)
Attachment #8792069 - Flags: review?(dminor) → review+
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/94cb2bf70c74
Add parens to some logic in VideoConduit.cpp, to address clang -Wlogical-op-parentheses build warning. r=dminor
https://hg.mozilla.org/mozilla-central/rev/94cb2bf70c74
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.