precedence: don't complain about if foo is 0-1
commitb94b83f784ffc84d8e4905656546b7e7fe13c82f
authorDan Carpenter <error27@gmail.com>
Mon, 10 May 2010 14:41:05 +0000 (10 16:41 +0200)
committerDan Carpenter <error27@gmail.com>
Mon, 10 May 2010 14:41:05 +0000 (10 16:41 +0200)
treebd962bc6e41d3c6abee934fbb565ee9bdb1db2f6
parent5822736915fb951005ffd7e5a3b61a09c0b7e5f2
precedence: don't complain about  if foo is 0-1

Previously smatch would not complain about "if (!foo = bar()) {" if
either "foo" or "bar()" was of type boolean.  But sometimes people use
variables as boolean even though the type is not declared as boolean.

If we can tell that foo is only either 0 or 1 even without looking at the
type then do not complain.

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_precedence.c