src/allocator.c

changeset 452
a10c3e127050
parent 450
7960298039cf
child 500
eb9e7bd40a8e
--- a/src/allocator.c	Sun Oct 03 12:04:27 2021 +0200
+++ b/src/allocator.c	Sun Oct 03 13:07:48 2021 +0200
@@ -30,17 +30,17 @@
 
 #include <stdlib.h>
 
-__attribute__((__malloc__))
+__attribute__((__malloc__, __alloc_size__(2)))
 static void *cx_malloc_stdlib(__attribute__((__unused__)) void *d, size_t n) {
     return malloc(n);
 }
 
-__attribute__((__warn_unused_result__))
+__attribute__((__warn_unused_result__, __alloc_size__(3)))
 static void *cx_realloc_stdlib(__attribute__((__unused__)) void *d, void *mem, size_t n) {
     return realloc(mem, n);
 }
 
-__attribute__((__malloc__))
+__attribute__((__malloc__, __alloc_size__(2, 3)))
 static void *cx_calloc_stdlib(__attribute__((__unused__)) void *d, size_t nelem, size_t n) {
     return calloc(nelem, n);
 }

mercurial