*new* double_checking: warn no duplicative conditons
commit36478b1c5fb0cff1f636f8c5b1420ed8477ef5b3
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Feb 2014 09:45:04 +0000 (11 12:45 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Feb 2014 09:45:04 +0000 (11 12:45 +0300)
treed6d899dd149824a65eab96f41cf7a830ca171e12
parent73be803b89b0987db9fb016404f108fbd32dfa57
*new* double_checking: warn no duplicative conditons

This test is only enabled with --spammy.  It prints a lot of warnings and
I'm not sure how useful it is to know about duplicate conditions actually.

It doesn't warn about duplicate NULL checks because I've already decided to
ignore people who check for NULL over and over.

One idea would be to make a version this check which only warns about:

if (foo) {
if (foo) {

But it wouldn't warn about:

if (!foo)
return;
if (foo) {

I would enable that check without the --spammy flag.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_double_checking.c [new file with mode: 0644]
check_list.h