DALnet / bahamut

The Bahamut IRC Daemon
http://www.dal.net/?page=Bahamut
Other
57 stars 42 forks source link

-Wconstant-logical-operand warnings #228

Open ryandesign opened 1 year ago

ryandesign commented 1 year ago

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)
                                 ~^~~~~~~~~~~~~~