Silence some GCC warnings.

This is from c89atomic which has been fixed upstream.
This commit is contained in:
David Reid
2024-08-04 09:08:27 +10:00
parent 5d827878f2
commit dc423daa41
+4
View File
@@ -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;
} }
#if defined(__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Watomic-alignment" #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;
} }
#if defined(__clang__)
#pragma clang diagnostic pop #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)