The fix is to add parens as needed to make the intent clear.
> On Mar 29, 2016, at 3:26 PM, Yann Ylavic <[email protected]> wrote:
>
> On Tue, Mar 29, 2016 at 9:14 PM, Jim Jagielski <[email protected]> wrote:
>> Looks like clang had been updated and a new error warning:
>>
>> core.c:2410:14: error: logical not is only applied to the left hand side of
>> this comparison
>> [-Werror,-Wlogical-not-parentheses]
>> else if (!strcmp(cmd->path, "/") == 0)
>> ^ ~~
>> core.c:2410:14: note: add parentheses after the '!' to evaluate the
>> comparison first
>> else if (!strcmp(cmd->path, "/") == 0)
>> ^
>> ( )
>> core.c:2410:14: note: add parentheses around left hand side expression to
>> silence this warning
>> else if (!strcmp(cmd->path, "/") == 0)
>> ^
>> ( )
>
> Hmm, this is incidentally the logic we want (actually
> strcmp(cmd->path, "/") != 0), AFAICT...