aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-09-30 23:05:16 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-01 00:45:21 +0200
commit1a88f2f24619e7a93aaef917fc72eba71706c9df (patch)
tree03d41386a00e539281647d67562b0343f6142bd2 /validation
parent58721d6e25e1845ce147150755e61401fcbc1a32 (diff)
downloadsparse-dev-1a88f2f24619e7a93aaef917fc72eba71706c9df.tar.gz
flex-array: warn when using sizeof() on a flexible array
Using sizeof() on a structure containing a flexible array will ignore the 'flexible' part. This is maybe what is expected but maybe not, so add an option -Wflexible-array-sizeof to warn on such usage. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/flex-array-sizeof.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/flex-array-sizeof.c b/validation/flex-array-sizeof.c
index 3359509d..05394e19 100644
--- a/validation/flex-array-sizeof.c
+++ b/validation/flex-array-sizeof.c
@@ -11,7 +11,6 @@ static int foo(struct s *s)
/*
* check-name: flex-array-sizeof
* check-command: sparse -Wflexible-array-sizeof $file
- * check-known-to-fail
*
* check-error-start
flex-array-sizeof.c:8:16: warning: using sizeof on a flexible structure