atomic_inc_dec: improve how inc/dec is recorded in the DB
[smatch.git] / validation / flex-array-sizeof.c
blob05394e19a6b27529f7456ac2ceaa1bf9a7425726
1 struct s {
2 int i;
3 long f[];
4 };
6 static int foo(struct s *s)
8 return sizeof(*s);
12 * check-name: flex-array-sizeof
13 * check-command: sparse -Wflexible-array-sizeof $file
15 * check-error-start
16 flex-array-sizeof.c:8:16: warning: using sizeof on a flexible structure
17 * check-error-end