[FFmpeg-cvslog] Merge commit '6a93b596c5c3af31b843d63013a7985ffeea354d'

James Almer git at videolan.org
Fri Apr 14 00:28:10 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr 13 18:27:20 2017 -0300| [eab5d29810d5d330e0d98f78a9c5ce7dd48a103a] | committer: James Almer

Merge commit '6a93b596c5c3af31b843d63013a7985ffeea354d'

* commit '6a93b596c5c3af31b843d63013a7985ffeea354d':
  compat/atomics: add typecasts in atomic_compare_exchange_strong()

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eab5d29810d5d330e0d98f78a9c5ce7dd48a103a
---

 compat/atomics/suncc/stdatomic.h | 2 +-
 compat/atomics/win32/stdatomic.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/compat/atomics/suncc/stdatomic.h b/compat/atomics/suncc/stdatomic.h
index 4a864a4ae9..0cf89e0f78 100644
--- a/compat/atomics/suncc/stdatomic.h
+++ b/compat/atomics/suncc/stdatomic.h
@@ -108,7 +108,7 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp
                                                  intptr_t desired)
 {
     intptr_t  old = *expected;
-    *expected = atomic_cas_ptr(object, old, desired);
+    *expected = (intptr_t)atomic_cas_ptr(object, (void *)old, (void *)desired);
     return *expected == old;
 }
 
diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h
index 092f453978..bb8e6e7e15 100644
--- a/compat/atomics/win32/stdatomic.h
+++ b/compat/atomics/win32/stdatomic.h
@@ -105,7 +105,8 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp
                                                  intptr_t desired)
 {
     intptr_t old = *expected;
-    *expected = InterlockedCompareExchangePointer(object, desired, old);
+    *expected = (intptr_t)InterlockedCompareExchangePointer(
+        (PVOID *)object, (PVOID)desired, (PVOID)old);
     return *expected == old;
 }
 


======================================================================




More information about the ffmpeg-cvslog mailing list