toolkit/components/maintenanceservice/workmonitor.cpp mixes && and || without parens [-Wlogical-op-parentheses]

RESOLVED FIXED in Firefox 64

Status

()

enhancement
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

unspecified
Firefox 64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

> 24:10.47 warning: toolkit/components/maintenanceservice/workmonitor.cpp:97:20 [-Wlogical-op-parentheses] '&&' within '||'
> 24:10.47 warning: toolkit/components/maintenanceservice/workmonitor.cpp:98:20 [-Wlogical-op-parentheses] '&&' within '||'
> 24:10.47 warning: toolkit/components/maintenanceservice/workmonitor.cpp:131:20 [-Wlogical-op-parentheses] '&&' within '||'
> 24:10.48 warning: toolkit/components/maintenanceservice/workmonitor.cpp:132:20 [-Wlogical-op-parentheses] '&&' within '||'

While this is well-defined, we should use parens to make clear the intent, without requiring memorization of operator precedence.
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7ec4fa5ecac1
Fix -Wlogical-op-parentheses. r=mhowell
https://hg.mozilla.org/mozilla-central/rev/7ec4fa5ecac1
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.