From 772e430d840a6479da87d4cd701d42695476c52e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 8 Apr 2015 09:31:14 +0200 Subject: util: Add attribute warn_unused_result to allocation functions Add the warn_unused_result GCC function attribute to all allocation functions in xmalloc. Signed-off-by: Tobias Klauser --- compiler.h | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler.h') diff --git a/compiler.h b/compiler.h index a6bf3a6..3559050 100644 --- a/compiler.h +++ b/compiler.h @@ -21,6 +21,7 @@ #ifdef __GNUC__ # define __noreturn __attribute__((noreturn)) +# define __warn_unused_result __attribute__((warn_unused_result)) # define __packed __attribute__((packed)) # define __unused __attribute__((unused)) # ifndef offsetof -- cgit v1.2.3-54-g00ecf