bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#48516: diff.c:764: possible wrong operator ?


From: David Binderman
Subject: [bug-diffutils] bug#48516: diff.c:764: possible wrong operator ?
Date: Wed, 19 May 2021 10:07:08 +0000

Hello there,

I just tried to compile diffutils-3.7 with clang. It said:

diff.c:764:8: warning: bitwise negation of a boolean expression; did you mean 
logical negation? [-Wbool-operation]

Source code is

  files_can_be_treated_as_binary =
    (brief & binary
     & ~ (ignore_blank_lines | ignore_case | strip_trailing_cr
          | (ignore_regexp_list.regexps || ignore_white_space)));

Maybe better code:

  files_can_be_treated_as_binary =
    (brief & binary
     & ! (ignore_blank_lines | ignore_case | strip_trailing_cr
          | (ignore_regexp_list.regexps || ignore_white_space)));

Regards

David Binderman








reply via email to

[Prev in Thread] Current Thread [Next in Thread]