From d18d0e85596f90e0bd597b33d58209d0b3973c95 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 1 Sep 2017 23:58:41 +0200 Subject: Make assert have no side effects This makes sure symbols referenced by assert uses may not be generated if unused. The recently introduced __unused macro is used to suppress compiler warnings resulting from this change. --- kern/sref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kern/sref.c') diff --git a/kern/sref.c b/kern/sref.c index 3603e781..95daeb0f 100644 --- a/kern/sref.c +++ b/kern/sref.c @@ -242,7 +242,7 @@ sref_queue_concat(struct sref_queue *queue1, struct sref_queue *queue2) queue1->size += queue2->size; } -static inline bool +__unused static inline bool sref_counter_aligned(const struct sref_counter *counter) { return (((uintptr_t)counter & (~SREF_WEAKREF_MASK)) == 0); -- cgit v1.2.3