diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-04-07 14:36:16 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-04-07 14:41:45 +0200 |
commit | bb77b49265877b68fc316d11a719527ecf91d594 (patch) | |
tree | f76e62ea1cf39b54d9f0b486745f97648b3f8f6a /built_in.h | |
parent | 87103d95678b0e6c784909e0bc610ed7ae02d2c9 (diff) |
xmalloc: 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 <tklauser@distanz.ch>
Diffstat (limited to 'built_in.h')
-rw-r--r-- | built_in.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -73,7 +73,11 @@ typedef uint8_t u8; #endif #ifndef __maybe_unused -# define __maybe_unused __attribute__ ((__unused__)) +# define __maybe_unused __attribute__((__unused__)) +#endif + +#ifndef __warn_unused_result +# define __warn_unused_result __attribute__((warn_unused_result)) #endif #ifndef noinline |