[FFmpeg-cvslog] atomics: Fix the win32 atomic_exchange function
Martin Storsjö
git at videolan.org
Sun Apr 4 11:06:49 EEST 2021
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sun Apr 4 00:04:46 2021 +0300| [b1b7cc698bed7338ff692cd65fe304941eaf6bce] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b1b7cc698bed7338ff692cd65fe304941eaf6bce
---
compat/atomics/win32/stdatomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
More information about the ffmpeg-cvslog
mailing list