2 // Currently the check is performed for apple targets only.
3 void test(const char *path
) {
4 int fd
= open(path
, O_CREAT
);
5 // warn: call to 'open' requires a third argument when the
6 // 'O_CREAT' flag is set
12 pthread_once_t pred
= {0x30B1BCBA, {0}};
13 pthread_once(&pred
, f
);
14 // warn: call to 'pthread_once' uses the local variable
18 void *p
= malloc(0); // warn: allocation size of 0 bytes
22 void *p
= calloc(0, 42); // warn: allocation size of 0 bytes
27 p
= realloc(p
, 0); // warn: allocation size of 0 bytes
31 void *p
= alloca(0); // warn: allocation size of 0 bytes
35 void *p
= valloc(0); // warn: allocation size of 0 bytes