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:15:17 +0100
commit0b30cce1e5fa30a7e7c0272a3e5adde303baad1a (patch)
treed8b1825a7ed4fa8b37606e9216a9df9dcd8fe9c2 /validation
parentad7c788e7a5b66b05a4cc8b7df35ffcec1ce5d49 (diff)
downloadsparse-dev-0b30cce1e5fa30a7e7c0272a3e5adde303baad1a.tar.gz
do not report bad types twice
The type 'bad_ctype' is only used after an error has been detected. Since this error has also been reported, there is no reasons to issue more errors when a 'bad_ctype' is involved. This allow to focus on the root cause of the error. Fix this by checking in bad_expr_type() if one of the operands is already a 'bad_ctype' and do not issue an diagnostic message in this case. Note: the kernel has a bunch of these situations where the exact same warning is given several times in a row, sometimes as much as a dozen time. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/bad-type-twice2.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/bad-type-twice2.c b/validation/bad-type-twice2.c
index 916e8202..0aadd7a3 100644
--- a/validation/bad-type-twice2.c
+++ b/validation/bad-type-twice2.c
@@ -7,7 +7,6 @@ int foo(int x, int y)
/*
* check-name: bad-type-twice2
- * check-known-to-fail
*
* check-error-start
bad-type-twice2.c:1:8: warning: 'type_t' has implicit type