#12894: [Patch] HaikuDepot: Fix -Wlogical-not-parentheses
-------------------------------------+------------------------------
Reporter: mt | Owner: stippi
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/HaikuDepot | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-------------------------------------+------------------------------
Modify if condition at line 154 [1], since negating return value of
BEntry.GetPath() may not be B_OK.
{{{
/home/haiku/haiku/haiku/src/apps/haikudepot/ui/App.cpp:154:25: warning:
logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
if (!entry.Exists() || !entry.GetPath(&path) == B_OK) {
^ ~~
/home/haiku/haiku/haiku/src/apps/haikudepot/ui/App.cpp:154:25: note: add
parentheses after the '!' to evaluate the comparison first
if (!entry.Exists() || !entry.GetPath(&path) == B_OK) {
^
( )
/home/haiku/haiku/haiku/src/apps/haikudepot/ui/App.cpp:154:25: note: add
parentheses around left hand side expression to silence this warning
if (!entry.Exists() || !entry.GetPath(&path) == B_OK) {
^
( )
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12894>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.