Skip to content

Commit 36ee5f9

Browse files
committed
avoid warning on newer clang
1 parent 1325ee6 commit 36ee5f9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/mimalloc/atomic.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ terms of the MIT license. A copy of the license can be found in the file
4141
#include <stdatomic.h>
4242
#define mi_atomic(name) atomic_##name
4343
#define mi_memory_order(name) memory_order_##name
44-
#if !defined(ATOMIC_VAR_INIT) || (__STDC_VERSION__ >= 201710L) // c17, see issue #735
44+
#if (__STDC_VERSION__ >= 201710L) // c17, see issue #735
45+
#define MI_ATOMIC_VAR_INIT(x) x
46+
#elif !defined(ATOMIC_VAR_INIT)
4547
#define MI_ATOMIC_VAR_INIT(x) x
4648
#else
4749
#define MI_ATOMIC_VAR_INIT(x) ATOMIC_VAR_INIT(x)

0 commit comments

Comments
 (0)