diff options
author | Yinan Zhang <zyn8950@gmail.com> | 2019-07-27 00:00:24 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2019-07-30 18:37:56 (GMT) |
commit | 9344d25488b626739c9080eb471d1bd15eeb046b (patch) | |
tree | 2dae9879453afc37a158a9dcb19746b1f31d9119 | |
parent | c9cdc1b27f8aa9c1e81e733e60d470c04be960b3 (diff) | |
download | jemalloc-9344d25488b626739c9080eb471d1bd15eeb046b.zip jemalloc-9344d25488b626739c9080eb471d1bd15eeb046b.tar.gz jemalloc-9344d25488b626739c9080eb471d1bd15eeb046b.tar.bz2 |
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).
-rw-r--r-- | include/jemalloc/internal/atomic_gcc_atomic.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/jemalloc/internal/atomic_gcc_atomic.h b/include/jemalloc/internal/atomic_gcc_atomic.h index 6b73a14..471515e 100644 --- a/include/jemalloc/internal/atomic_gcc_atomic.h +++ b/include/jemalloc/internal/atomic_gcc_atomic.h @@ -67,7 +67,8 @@ atomic_exchange_##short_type(atomic_##short_type##_t *a, type val, \ \ ATOMIC_INLINE bool \ 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) { \ return __atomic_compare_exchange(&a->repr, expected, &desired, \ 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_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) { \ return __atomic_compare_exchange(&a->repr, expected, &desired, \ false, \ |