Opened 8 years ago

Closed 8 years ago

#12894 closed bug (fixed)

[Patch] HaikuDepot: Fix -Wlogical-not-parentheses

Reported by: mt Owned by: stippi
Priority: normal Milestone: Unscheduled
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

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) {
                               ^
                               (                    )

Attachments (1)

0025-HaikuDepot-Fix-Wlogical-not-parentheses.patch (769 bytes ) - added by mt 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by mt, 8 years ago

patch: 01

comment:2 by pulkomandy, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev50503.

Note: See TracTickets for help on using tickets.