[klibc] [klibc:update-dash] [PATCH] eval: Silence compiler warning about missing parentheses
klibc-bot for Antonio Ospite
ao2 at ao2.it
Thu Jan 24 19:16:02 PST 2019
Commit-ID: c970d7573aa382c89d3c71b88cd10f4c6a464264
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=c970d7573aa382c89d3c71b88cd10f4c6a464264
Author: Antonio Ospite <ao2 at ao2.it>
AuthorDate: Tue, 16 Oct 2018 18:42:20 +0200
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [PATCH] eval: Silence compiler warning about missing parentheses
Gcc gives a warning about some missing parentheses:
-----------------------------------------------------------------------
eval.c: In function ‘evaltree’:
eval.c:282:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!status == isor || evalskip)
^~
eval.c:282:7: note: add parentheses around left hand side expression to silence this warning
if (!status == isor || evalskip)
^~~~~~~
( )
-----------------------------------------------------------------------
Add the parentheses to silence the warning.
Signed-off-by: Antonio Ospite <ao2 at ao2.it>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/eval.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 56661880..cecd41c1 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -278,7 +278,7 @@ checkexit:
isor = n->type - NAND;
status = evaltree(n->nbinary.ch1,
(flags | ((isor >> 1) - 1)) & EV_TESTED);
- if (!status == isor || evalskip)
+ if ((!status) == isor || evalskip)
break;
n = n->nbinary.ch2;
evaln:
More information about the klibc
mailing list