Commit dc423daa authored by David Reid's avatar David Reid

Silence some GCC warnings.

This is from c89atomic which has been fixed upstream.
parent 5d827878
...@@ -14878,14 +14878,18 @@ typedef int ma_atomic_memory_order; ...@@ -14878,14 +14878,18 @@ typedef int ma_atomic_memory_order;
__atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
return expected; return expected;
} }
#pragma clang diagnostic push #if defined(__clang__)
#pragma clang diagnostic ignored "-Watomic-alignment" #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Watomic-alignment"
#endif
static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired) static MA_INLINE ma_uint64 ma_atomic_compare_and_swap_64(volatile ma_uint64* dst, ma_uint64 expected, ma_uint64 desired)
{ {
__atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); __atomic_compare_exchange_n(dst, &expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
return expected; return expected;
} }
#pragma clang diagnostic pop #if defined(__clang__)
#pragma clang diagnostic pop
#endif
typedef ma_uint8 ma_atomic_flag; typedef ma_uint8 ma_atomic_flag;
#define ma_atomic_flag_test_and_set_explicit(dst, order) (ma_bool32)__atomic_test_and_set(dst, order) #define ma_atomic_flag_test_and_set_explicit(dst, order) (ma_bool32)__atomic_test_and_set(dst, order)
#define ma_atomic_flag_clear_explicit(dst, order) __atomic_clear(dst, order) #define ma_atomic_flag_clear_explicit(dst, order) __atomic_clear(dst, order)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment