diff options
author | Antonio Ospite <ao2@ao2.it> | 2018-10-16 18:42:20 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2020-03-28 21:42:55 +0000 |
commit | e3da328217a1fbfaad2ae617dbc26746adf63f8f (patch) | |
tree | 0862c55674c82d6b6394148c87955c4417680297 | |
parent | 7bab7bbbfb0b8914691de08ed22a5cbda336952e (diff) | |
download | klibc-e3da328217a1fbfaad2ae617dbc26746adf63f8f.tar.gz |
[klibc] dash: eval: Silence compiler warning about missing parentheses
[ dash commit f97aaf80dd44e92f2cabc7e6d92d461f4fe6eddd ]
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@ao2.it>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | usr/dash/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 09a5cbf117f0a..dc0c9fa20500c 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -279,7 +279,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: |