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:
parent
4a7e05917f
commit
dcaa6606e0
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user