From c9678832b15065f9a0147c308ed79d00f8d4237a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 9 Jul 2013 10:44:06 +0200 Subject: include/xalloc: add warn_unused_result to allocation functions Signed-off-by: Karel Zak --- include/c.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/c.h') diff --git a/include/c.h b/include/c.h index a50e8a593..4a9bf3d42 100644 --- a/include/c.h +++ b/include/c.h @@ -56,7 +56,7 @@ */ #ifndef __ul_alloc_size # if __GNUC_PREREQ (4, 3) -# define __ul_alloc_size(s) __attribute__((alloc_size(s))) +# define __ul_alloc_size(s) __attribute__((alloc_size(s), warn_unused_result)) # else # define __ul_alloc_size(s) # endif @@ -64,7 +64,7 @@ #ifndef __ul_calloc_size # if __GNUC_PREREQ (4, 3) -# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s))) +# define __ul_calloc_size(n, s) __attribute__((alloc_size(n, s), warn_unused_result)) # else # define __ul_calloc_size(n, s) # endif -- cgit v1.2.3-55-g7522