implied: use a time based timeout instead of counting ->nr_children
[smatch.git] / validation / sm_buf_size3.c
blob4bde6dbea6a77fd6da9cdc243384dfcaece84975
1 #include "check_debug.h"
3 void *malloc(int);
5 void func(void)
7 char *a;
9 a = malloc(sizeof(int) * 4);
10 __smatch_buf_size(a);
11 __smatch_buf_size((int *)a);
15 * check-name: smatch buf size #3
16 * check-command: smatch -I.. sm_buf_size3.c
18 * check-output-start
19 sm_buf_size3.c:10 func() buf size: 'a' 16 elements, 16 bytes
20 sm_buf_size3.c:11 func() buf size: 'a' 4 elements, 16 bytes
21 * check-output-end