lib: mempool: alloc_bit_is_set is used only with asserts
Put it behind an ifdef CONFIG_ASSERT to make clang happy.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/lib/os/mempool.c b/lib/os/mempool.c
index 6258a4c..b71bde0 100644
--- a/lib/os/mempool.c
+++ b/lib/os/mempool.c
@@ -56,13 +56,16 @@
*word &= ~(1<<bit);
}
-static inline bool alloc_bit_is_set(struct sys_mem_pool_base *p, int level, int bn)
+#ifdef CONFIG_ASSERT
+static inline bool alloc_bit_is_set(struct sys_mem_pool_base *p,
+ int level, int bn)
{
uint32_t *word;
int bit = get_bit_ptr(p, level, bn, &word);
return (*word >> bit) & 1;
}
+#endif
/* Returns all four of the allocated bits for the specified blocks
* "partners" in the bottom 4 bits of the return value