[klibc] usr/dash/eval.c:277:19: warning: logical not is only applied to the left hand side of comparison
Sam Ravnborg
sam at ravnborg.org
Tue Jan 22 11:23:15 PST 2019
Hi Christophe.
On Tue, Jan 22, 2019 at 04:53:05PM +0000, Christophe Leroy wrote:
> KLIBCCC usr/dash/eval.o
> usr/dash/eval.c: In function 'evaltree':
> usr/dash/eval.c:277:19: warning: logical not is only applied to the
> left hand side of comparison [-Wlogical-not-parentheses]
> if (!exitstatus == isor)
> ^
>
> Not sure what the fix should be:
>
> if (!(exitstatus == isor))
>
>
> Or
>
>
> if ((!exitstatus) == isor)
>
>
>
> Any idea ?
Take a look at upstream dash where this is fixed
https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/src/eval.c?id=f97aaf80dd44e92f2cabc7e6d92d461f4fe6eddd
So one could backport this fix.
But a better approach was maybe to upgrade to latest dash version.
Sam
More information about the klibc
mailing list