impossible_compare: separate the impossible comparison check into one file
commit016047d75b6162182a98f3c40f62f864e8b2579b
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 5 Jul 2023 14:22:45 +0000 (5 17:22 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Wed, 5 Jul 2023 14:22:45 +0000 (5 17:22 +0300)
tree43c1e5e336f752864140951944dbb6c206c55f9b
parent491c6f313378a33a0e5fed9a3a03f90a31a922f5
impossible_compare: separate the impossible comparison check into one file

The check_signed.c check was one of the first checks which I wrote and in
those days I used to combine all kinds of checks into one file.  These
days, I prefer to have one warning message per file because it's more
readable and easier to maintain.  So pull this into a separate file.

The other thing that this does is if it's an unsigned_var < 0 warning,
then do not print that.  It's already covered by check_unsigned_lt_zero.c.

And another thing that it does is it silences a bunch of false positives
in the kernel by making a list of allowed macros.  It's kind of a blunt
way to do it, but it works and is simple to implement.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
check_impossible_compare.c [new file with mode: 0644]
check_list.h
check_signed.c