Fixed compiler warnings using Windows intrinsics
authorSam Lantinga <slouken@libsdl.org>
Mon, 17 Jan 2011 14:07:15 -0800
changeset 5016cc879bc6c4cf
parent 5015 1bf9e38431ec
child 5017 a9a3b9852a4a
Fixed compiler warnings using Windows intrinsics
include/SDL_atomic.h
     1.1 --- a/include/SDL_atomic.h	Mon Jan 17 14:05:43 2011 -0800
     1.2 +++ b/include/SDL_atomic.h	Mon Jan 17 14:07:15 2011 -0800
     1.3 @@ -115,12 +115,12 @@
     1.4  #if defined(__WIN32__)
     1.5  #include <intrin.h>
     1.6  
     1.7 -#define SDL_AtomicSet(a, v)     _InterlockedExchange(&(a)->value, (v))
     1.8 +#define SDL_AtomicSet(a, v)     _InterlockedExchange((long*)&(a)->value, (v))
     1.9  #define SDL_AtomicGet(a)        ((a)->value)
    1.10 -#define SDL_AtomicAdd(a, v)     _InterlockedExchangeAdd(&(a)->value, (v))
    1.11 -#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange(&(a)->value, (newval), (oldval)) == (oldval))
    1.12 +#define SDL_AtomicAdd(a, v)     _InterlockedExchangeAdd((long*)&(a)->value, (v))
    1.13 +#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval))
    1.14  #define SDL_AtomicSetPtr(a, v)  (void)_InterlockedExchangePointer((a), (v))
    1.15 -#define SDL_AtomicGetPtr(a)     (*(a))
    1.16 +#define SDL_AtomicGetPtr(a)     (*(a))
    1.17  #if _M_IX86
    1.18  #define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchange((long*)(a), (long)(newval), (long)(oldval)) == (long)(oldval))
    1.19  #else