aboutsummaryrefslogtreecommitdiff
path: root/include/pool.h
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-11-27 14:09:48 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-11-27 14:09:48 +1100
commit2230176f5a678dc8612e1bc6830fc39fb719b79b (patch)
tree56f97e02ab7c0b24e5c064132ec71555dbcf6a23 /include/pool.h
parent437701274b0e2f816b6f63f4bb6b9525c5f561ee (diff)
downloadskiboot-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.h5
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 */