klibc-bot for Antonio Ospite
2020-Mar-28 21:49 UTC
[klibc] [klibc:update-dash] dash: eval: Silence compiler warning about missing parentheses
Commit-ID: e3da328217a1fbfaad2ae617dbc26746adf63f8f Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=e3da328217a1fbfaad2ae617dbc26746adf63f8f 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: Sat, 28 Mar 2020 21:42:55 +0000 [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 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 09a5cbf1..dc0c9fa2 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:
Reasonably Related Threads
- [klibc:update-dash] [PATCH] eval: Silence compiler warning about missing parentheses
- [klibc:update-dash] eval: Return status in eval functions
- [klibc:update-dash] dash: eval: Return status in eval functions
- [klibc:update-dash] [EVAL] Move common skipcount logic into skiploop
- [klibc:update-dash] dash: [EVAL] Move common skipcount logic into skiploop