Commit 54168d55 authored by Ondřej Surý's avatar Ondřej Surý

Fix invalid cast in win32 stdatomic.h shim

The InterlockedOr8() and InterlockedAnd8() first argument was cast
to (atomic_int_fast8_t) instead of (atomic_int_fast8_t *), this was
reported by MSVC as:

  warning C4024: '_InterlockedOr8': different types for formal and actual parameter 1
  warning C4024: '_InterlockedAnd8': different types for formal and actual parameter 1
parent 70318943
......@@ -244,7 +244,7 @@ atomic_add_abort() {
atomic_fetch_sub_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_and_explicit8(obj, arg, order) \
InterlockedAnd8((atomic_int_fast8_t)obj, arg)
InterlockedAnd8((atomic_int_fast8_t *)obj, arg)
#define atomic_fetch_and_explicit32(obj, arg, order) \
(order == memory_order_relaxed \
......@@ -299,7 +299,7 @@ atomic_and_abort() {
atomic_fetch_and_explicit(obj, arg, memory_order_seq_cst)
#define atomic_fetch_or_explicit8(obj, arg, order) \
InterlockedOr8((atomic_int_fast8_t)obj, arg)
InterlockedOr8((atomic_int_fast8_t *)obj, arg)
#define atomic_fetch_or_explicit32(obj, arg, order) \
(order == memory_order_relaxed \
......
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