From 9a07e480f22abfd904c710327260a73411be9259 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 1 Nov 2015 14:36:16 +0100 Subject: [PATCH] Add __attribute((malloc)) to sodium_{allocarray,malloc}() --- src/libsodium/include/sodium/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/utils.h b/src/libsodium/include/sodium/utils.h index 5e7b49c5..bb42c0c6 100644 --- a/src/libsodium/include/sodium/utils.h +++ b/src/libsodium/include/sodium/utils.h @@ -95,11 +95,11 @@ int sodium_munlock(void * const addr, const size_t len); SODIUM_EXPORT void *sodium_malloc(const size_t size) - __attribute__ ((warn_unused_result)); + __attribute__ ((malloc)); SODIUM_EXPORT void *sodium_allocarray(size_t count, size_t size) - __attribute__ ((warn_unused_result)); + __attribute__ ((malloc)); SODIUM_EXPORT void sodium_free(void *ptr);