From 4e4ecd0c82291a40dc7a70da76a93c58dc6dba81 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 9 Jan 2016 21:44:51 +0100 Subject: Added the unused attribute to BL_UCAST / BL_UCCAST - Fixes a warning when including map.h and not using those functions, depending on the compiler verbosity Signed-off-by: Haru --- src/map/map.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/map.h b/src/map/map.h index 4c74d352c..13b7880bd 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -866,6 +866,7 @@ typedef struct elemental_data TBL_ELEM; * object is passed to BL_UCAST. It's declared as static inline to let the * compiler optimize out the function call overhead. */ +static inline struct block_list *BL_UCAST_(struct block_list *bl) __attribute__((unused)); static inline struct block_list *BL_UCAST_(struct block_list *bl) { return bl; @@ -894,6 +895,7 @@ static inline struct block_list *BL_UCAST_(struct block_list *bl) * object is passed to BL_UCAST. It's declared as static inline to let the * compiler optimize out the function call overhead. */ +static inline const struct block_list *BL_UCCAST_(const struct block_list *bl) __attribute__((unused)); static inline const struct block_list *BL_UCCAST_(const struct block_list *bl) { return bl; -- cgit v1.2.3-60-g2f50