#12893: [Patch] Terminal: Fix -Wlogical-not-parentheses
-----------------------------------+------------------------------
Reporter: mt | Owner: jackburton
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/Terminal | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-----------------------------------+------------------------------
Modify if condition at line 1597 [1], since strcmp() returns 0 > or < 0 on
failture, negating it may not be 0.
[1] http://cgit.haiku-
os.org/haiku/tree/src/apps/terminal/TermView.cpp?id=8a12a74e81e7969b2b963f95bb27779b80dc9ad4#n1597
{{{
/home/haiku/haiku/haiku/src/apps/terminal/TermView.cpp:1597:8: warning:
logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
&& !strcmp("encoding",
^
/home/haiku/haiku/haiku/src/apps/terminal/TermView.cpp:1597:8: note: add
parentheses after the '!' to evaluate the comparison first
&& !strcmp("encoding",
^
/home/haiku/haiku/haiku/src/apps/terminal/TermView.cpp:1597:8: note: add
parentheses around left hand side expression to silence this warning
&& !strcmp("encoding",
^
}}}
--
Ticket URL: <https://dev.haiku-os.org/ticket/12893>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.