aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-07-04 14:46:25 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-01 18:05:46 +0100
commit3a8d5ac8681871e44062965566f9211a8d302da4 (patch)
treeb62e066acd8806bb930176404193c8b550d9e07a /validation
parentc376727487f988de9b5368e67e9bdcb2b59edde4 (diff)
downloadsparse-dev-3a8d5ac8681871e44062965566f9211a8d302da4.tar.gz
use valid_type to avoid to warn twice on conditionals
When evaluating a conditional, the expression is first evaluated and some further verifications and processing are done if the returned type is not NULL. However, the returned type can also be 'bad_ctype' and if it is the case, the additional verifications will just give meaningless additional warnings. Fix this by using the new helper valid_type() instead of just testing for a null ctype. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/bad-type-twice1.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/bad-type-twice1.c b/validation/bad-type-twice1.c
index 2f4e2838..95cfd9e0 100644
--- a/validation/bad-type-twice1.c
+++ b/validation/bad-type-twice1.c
@@ -7,7 +7,6 @@ static unsigned long foo(unsigned long val, void *ref)
/*
* check-name: bad-type-twice1
- * check-known-to-fail
*
* check-error-start
bad-type-twice1.c:3:17: error: incompatible types for operation (>=)