unreachable code: don't warn about empty statements
[smatch.git] / validation / sm_buf_size1.c
blob709f5472c450c5ac706e532434739e4eccf4a8b1
1 #include "check_debug.h"
3 void func(void)
5 int a[4];
6 char b[4];
7 char *c = (char *)a;
8 int *d = (int *)b;
10 __smatch_buf_size(a);
11 __smatch_buf_size(b);
12 __smatch_buf_size(c);
13 __smatch_buf_size(d);
17 * check-name: smatch buf size #1
18 * check-command: smatch -I.. sm_buf_size1.c
20 * check-output-start
21 sm_buf_size1.c:10 func() buf size: 'a' 4 elements, 16 bytes
22 sm_buf_size1.c:11 func() buf size: 'b' 4 elements, 4 bytes
23 sm_buf_size1.c:12 func() buf size: 'c' 16 elements, 16 bytes
24 sm_buf_size1.c:13 func() buf size: 'd' 1 elements, 4 bytes
25 * check-output-end