From be1883d978247bbfa7baef5bfa0051868fc5803b Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 3 Aug 2022 13:05:20 +0200 Subject: [PATCH] lib/ftl: Fix -Wunused-function under clang Builds under clang fail with the following: utils/ftl_mempool.c:45:1: error: unused function 'is_element_valid' [-Werror,-Wunused-function] is_element_valid(struct ftl_mempool *mpool, void *element) ^ 1 error generated. Signed-off-by: Michal Berger Change-Id: Ic776f3f226e9ea6ed9d0bbd0a3d8e2a0661e0d11 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13844 Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Aleksey Marchuk Reviewed-by: Dong Yi Reviewed-by: Kamil Godzwon Community-CI: Mellanox Build Bot --- lib/ftl/utils/ftl_mempool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ftl/utils/ftl_mempool.c b/lib/ftl/utils/ftl_mempool.c index e1ccb6b58..6346f2bb1 100644 --- a/lib/ftl/utils/ftl_mempool.c +++ b/lib/ftl/utils/ftl_mempool.c @@ -25,6 +25,8 @@ struct ftl_mempool { int socket_id; }; +static inline bool is_element_valid(struct ftl_mempool *mpool, + void *element) __attribute__((unused)); static size_t element_size_aligned(size_t size, size_t alignment)