summaryrefslogtreecommitdiff
path: root/kern/sref.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-01 23:58:41 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-02 15:25:37 +0200
commitd18d0e85596f90e0bd597b33d58209d0b3973c95 (patch)
tree6c3472f59cf64244ab86d2fc13b220b1c8f61165 /kern/sref.c
parent897ad6a062ea2a32a2759613608faf3271211832 (diff)
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.
Diffstat (limited to 'kern/sref.c')
-rw-r--r--kern/sref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/sref.c b/kern/sref.c
index 3603e78..95daeb0 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);