changeset 5016:cc879bc6c4cf

Fixed compiler warnings using Windows intrinsics
author Sam Lantinga <slouken@libsdl.org>
date Mon, 17 Jan 2011 14:07:15 -0800
parents 1bf9e38431ec
children a9a3b9852a4a
files include/SDL_atomic.h
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_atomic.h	Mon Jan 17 14:05:43 2011 -0800
+++ b/include/SDL_atomic.h	Mon Jan 17 14:07:15 2011 -0800
@@ -115,12 +115,12 @@
 #if defined(__WIN32__)
 #include <intrin.h>
 
-#define SDL_AtomicSet(a, v)     _InterlockedExchange(&(a)->value, (v))
+#define SDL_AtomicSet(a, v)     _InterlockedExchange((long*)&(a)->value, (v))
 #define SDL_AtomicGet(a)        ((a)->value)
-#define SDL_AtomicAdd(a, v)     _InterlockedExchangeAdd(&(a)->value, (v))
-#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange(&(a)->value, (newval), (oldval)) == (oldval))
+#define SDL_AtomicAdd(a, v)     _InterlockedExchangeAdd((long*)&(a)->value, (v))
+#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval))
 #define SDL_AtomicSetPtr(a, v)  (void)_InterlockedExchangePointer((a), (v))
-#define SDL_AtomicGetPtr(a)     (*(a))
+#define SDL_AtomicGetPtr(a)     (*(a))
 #if _M_IX86
 #define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchange((long*)(a), (long)(newval), (long)(oldval)) == (long)(oldval))
 #else