diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-11-27 14:09:48 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-11-27 14:09:48 +1100 |
commit | 2230176f5a678dc8612e1bc6830fc39fb719b79b (patch) | |
tree | 56f97e02ab7c0b24e5c064132ec71555dbcf6a23 /include/pool.h | |
parent | 437701274b0e2f816b6f63f4bb6b9525c5f561ee (diff) | |
download | skiboot-2230176f5a678dc8612e1bc6830fc39fb719b79b.zip skiboot-2230176f5a678dc8612e1bc6830fc39fb719b79b.tar.gz skiboot-2230176f5a678dc8612e1bc6830fc39fb719b79b.tar.bz2 |
Liberally sprinkle attribute((warn_unused_result)) around the place
None of these actually produce any warnings. My next patch will.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/pool.h')
-rw-r--r-- | include/pool.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/pool.h b/include/pool.h index 89ef967..11730a9 100644 --- a/include/pool.h +++ b/include/pool.h @@ -3,6 +3,7 @@ #include <ccan/list/list.h> #include <stddef.h> +#include <compiler.h> struct pool { void *buf; @@ -14,8 +15,8 @@ struct pool { enum pool_priority {POOL_NORMAL, POOL_HIGH}; -void* pool_get(struct pool *pool, enum pool_priority priority); +void* pool_get(struct pool *pool, enum pool_priority priority) __warn_unused_result; void pool_free_object(struct pool *pool, void *obj); -int pool_init(struct pool *pool, size_t obj_size, int count, int reserved); +int pool_init(struct pool *pool, size_t obj_size, int count, int reserved) __warn_unused_result; #endif /* __POOL_H */ |