Or vs and: warn about bitwise ANDs that always give zero
This is only turned on if you have --spammy enabled because it tends to
have a bunch of false positives.
The rule her is that if we have (x & y) that is not in a macro and always
results in a zero then print a warning.
foo = (0x1 & 0x2); // <- warn
One cause of false positives is that maybe we mask out the upper bits
giving zero and then we mask out the lower bits on the next line. Another
is code that which is commented out or which has only been partially
implemented.
frob(FOO | ( 0 & PLANNED_FEATURE));
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>