Workaround to address g++ unused variable warnings
g++ 5.5.0+ complained `parameter ‘expected’ set but not used [-Werror=unused-but-set-parameter]` (despite that `expected` is in fact used).
This commit is contained in:
parent
c9cdc1b27f
commit
9344d25488
@ -67,7 +67,8 @@ atomic_exchange_##short_type(atomic_##short_type##_t *a, type val, \
|
|||||||
\
|
\
|
||||||
ATOMIC_INLINE bool \
|
ATOMIC_INLINE bool \
|
||||||
atomic_compare_exchange_weak_##short_type(atomic_##short_type##_t *a, \
|
atomic_compare_exchange_weak_##short_type(atomic_##short_type##_t *a, \
|
||||||
type *expected, type desired, atomic_memory_order_t success_mo, \
|
UNUSED type *expected, type desired, \
|
||||||
|
atomic_memory_order_t success_mo, \
|
||||||
atomic_memory_order_t failure_mo) { \
|
atomic_memory_order_t failure_mo) { \
|
||||||
return __atomic_compare_exchange(&a->repr, expected, &desired, \
|
return __atomic_compare_exchange(&a->repr, expected, &desired, \
|
||||||
true, atomic_enum_to_builtin(success_mo), \
|
true, atomic_enum_to_builtin(success_mo), \
|
||||||
@ -76,7 +77,8 @@ atomic_compare_exchange_weak_##short_type(atomic_##short_type##_t *a, \
|
|||||||
\
|
\
|
||||||
ATOMIC_INLINE bool \
|
ATOMIC_INLINE bool \
|
||||||
atomic_compare_exchange_strong_##short_type(atomic_##short_type##_t *a, \
|
atomic_compare_exchange_strong_##short_type(atomic_##short_type##_t *a, \
|
||||||
type *expected, type desired, atomic_memory_order_t success_mo, \
|
UNUSED type *expected, type desired, \
|
||||||
|
atomic_memory_order_t success_mo, \
|
||||||
atomic_memory_order_t failure_mo) { \
|
atomic_memory_order_t failure_mo) { \
|
||||||
return __atomic_compare_exchange(&a->repr, expected, &desired, \
|
return __atomic_compare_exchange(&a->repr, expected, &desired, \
|
||||||
false, \
|
false, \
|
||||||
|
Loading…
Reference in New Issue
Block a user