Closed Bug 786031 Opened 7 years ago Closed 7 years ago

nsFrame.cpp:846:42: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

nsFrame.cpp spams 6 lines of GCC warnings right now:
{
../../../mozilla/layout/generic/nsFrame.cpp: In member function ‘virtual nsMargin nsIFrame::GetUsedMargin() const’:
../../../mozilla/layout/generic/nsFrame.cpp:846:42: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
../../../mozilla/layout/generic/nsFrame.cpp: In member function ‘virtual nsMargin nsIFrame::GetUsedBorder() const’:
../../../mozilla/layout/generic/nsFrame.cpp:869:42: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
../../../mozilla/layout/generic/nsFrame.cpp: In member function ‘virtual nsMargin nsIFrame::GetUsedPadding() const’:
../../../mozilla/layout/generic/nsFrame.cpp:905:42: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
}

These are for the "||" clauses added in this diff:
  https://hg.mozilla.org/mozilla-central/diff/f4f26647c555/layout/generic/nsFrame.cpp
for bug 655877.
Attachment #655739 - Flags: review?(cam)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Depends on: svgtext
Attachment #655739 - Attachment description: fix v1 → fix v1: add implied parens around "&&"
Comment on attachment 655739 [details] [diff] [review]
fix v1: add implied parens around "&&"

Thanks Daniel.
Attachment #655739 - Flags: review?(cam) → review+
https://hg.mozilla.org/mozilla-central/rev/16f3f0aab884
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.