diff options
author | Martin Storsjö <martin@martin.st> | 2021-04-04 00:04:46 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-04-04 11:06:08 +0300 |
commit | b1b7cc698bed7338ff692cd65fe304941eaf6bce (patch) | |
tree | f7676c33ef67609b6f5748ceb718f0b63504d74b /compat | |
parent | 18dcbb0d6ce7434a76f8ebea40739e8eb5b14b78 (diff) | |
download | ffmpeg-b1b7cc698bed7338ff692cd65fe304941eaf6bce.tar.gz |
atomics: Fix the win32 atomic_exchange function
This fixes building with MSVC after
a2a38b160620d91bc3f895dadc4501c589998b9c.
Remove the stray semicolon, and add casts for the input argument
(which is an intptr_t*) to the right type (PVOID volatile *).
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/atomics/win32/stdatomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index bb8e6e7e15..28a627bfd3 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -96,7 +96,7 @@ do { \ atomic_load(object) #define atomic_exchange(object, desired) \ - InterlockedExchangePointer(object, desired); + InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired) #define atomic_exchange_explicit(object, desired, order) \ atomic_exchange(object, desired) |