1.1 --- a/src/allocator.c Sun Oct 03 12:04:27 2021 +0200 1.2 +++ b/src/allocator.c Sun Oct 03 13:07:48 2021 +0200 1.3 @@ -30,17 +30,17 @@ 1.4 1.5 #include <stdlib.h> 1.6 1.7 -__attribute__((__malloc__)) 1.8 +__attribute__((__malloc__, __alloc_size__(2))) 1.9 static void *cx_malloc_stdlib(__attribute__((__unused__)) void *d, size_t n) { 1.10 return malloc(n); 1.11 } 1.12 1.13 -__attribute__((__warn_unused_result__)) 1.14 +__attribute__((__warn_unused_result__, __alloc_size__(3))) 1.15 static void *cx_realloc_stdlib(__attribute__((__unused__)) void *d, void *mem, size_t n) { 1.16 return realloc(mem, n); 1.17 } 1.18 1.19 -__attribute__((__malloc__)) 1.20 +__attribute__((__malloc__, __alloc_size__(2, 3))) 1.21 static void *cx_calloc_stdlib(__attribute__((__unused__)) void *d, size_t nelem, size_t n) { 1.22 return calloc(nelem, n); 1.23 }