diff options
Diffstat (limited to 'src/xmalloc.h')
-rw-r--r-- | src/xmalloc.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/xmalloc.h b/src/xmalloc.h index 747509c..cf35712 100644 --- a/src/xmalloc.h +++ b/src/xmalloc.h @@ -3,15 +3,19 @@ #include <stdlib.h> -__attribute__((malloc)) +[[nodiscard("memory leaked")]] +[[gnu::malloc]] void *xmalloc(size_t size); -__attribute__((malloc)) +[[nodiscard("memory leaked")]] +[[gnu::malloc]] void *xcalloc(size_t nmemb, size_t size); +[[nodiscard("memory leaked")]] void *xrealloc(void *ptr, size_t size); -__attribute__((malloc)) +[[nodiscard("memory leaked")]] +[[gnu::malloc]] char *xstrdup(const char *s); #endif /* XMALLOC_H */ |