bahamut icon indicating copy to clipboard operation
bahamut copied to clipboard

-Wconstant-logical-operand warnings

Open ryandesign opened this issue 2 years ago • 0 comments

This warning appears when compiling with a modern Clang compiler:

pcre.c:2891:35: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
        else if ((digitab[ptr[1]] && ctype_digit) != 0)
                                  ^  ~~~~~~~~~~~
pcre.c:2891:35: note: use '&' for a bitwise operation
        else if ((digitab[ptr[1]] && ctype_digit) != 0)
                                  ^~
                                  &
pcre.c:2891:35: note: remove constant to silence this warning
        else if ((digitab[ptr[1]] && ctype_digit) != 0)
                                 ~^~~~~~~~~~~~~~

ryandesign avatar Jul 06 '23 20:07 ryandesign