Closed Bug 1072062 Opened 6 years ago Closed 6 years ago

SampleTable.cpp:595:27: warning: '&&' within '||' [-Wlogical-op-parentheses]

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

New build warning with clang on mozilla-inbound:
{
media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp:595:27: warning: '&&' within '||' [-Wlogical-op-parentheses]

     if (!mCencDefaultSize && !mCencInfoCount || mCencOffsets.isEmpty()) {
         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ~~

media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp:595:27: note: place parentheses around the '&&' expression to silence this warning
}
Attached patch fix v1Splinter Review
Here's the trivial fix suggested by the compiler. Edwin, does this parenthesization match the way you intended the logic to be evaluated?
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8494187 - Flags: review?(edwin)
Comment on attachment 8494187 [details] [diff] [review]
fix v1

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

Yep, that's the one I meant. Thanks for doing that.
Attachment #8494187 - Flags: review?(edwin) → review+
https://hg.mozilla.org/mozilla-central/rev/15082adbb409
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.