reflock: squelch clang warning about unused const var 'REFLOCK_DESTROY_MASK'

It is used, except when assertions are disabled due to the 'NDEBUG'
preprocessor variable being defined.
This commit is contained in:
Bert Belder 2020-06-04 03:02:50 +02:00
parent 4a7e05917f
commit dcaa6606e0
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461

View File

@ -49,6 +49,7 @@ void reflock_ref(reflock_t* reflock) {
/* Verify that the counter didn't overflow and the lock isn't destroyed. */ /* Verify that the counter didn't overflow and the lock isn't destroyed. */
assert((state & REFLOCK__DESTROY_MASK) == 0); assert((state & REFLOCK__DESTROY_MASK) == 0);
unused_var(state); unused_var(state);
unused_var(REFLOCK__DESTROY_MASK);
} }
void reflock_unref(reflock_t* reflock) { void reflock_unref(reflock_t* reflock) {
@ -56,6 +57,7 @@ void reflock_unref(reflock_t* reflock) {
/* Verify that the lock was referenced and not already destroyed. */ /* Verify that the lock was referenced and not already destroyed. */
assert((state & REFLOCK__DESTROY_MASK & ~REFLOCK__DESTROY) == 0); assert((state & REFLOCK__DESTROY_MASK & ~REFLOCK__DESTROY) == 0);
unused_var(REFLOCK__DESTROY_MASK);
if (state == REFLOCK__DESTROY) if (state == REFLOCK__DESTROY)
reflock__signal_event(reflock); reflock__signal_event(reflock);