From f839713a94c5e1bba0ba9acbdd6b8cf5d9ed7e2b Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 16 Oct 2014 21:07:41 +0400 Subject: [PATCH] Bugfix --- Utilities/GNU.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/GNU.h b/Utilities/GNU.h index 14eef264f6..91fc34ae50 100644 --- a/Utilities/GNU.h +++ b/Utilities/GNU.h @@ -119,7 +119,7 @@ static __forceinline bool InterlockedCompareExchangeTest(volatile uint8_t* dest, #if defined(__GNUG__) return __sync_bool_compare_and_swap(dest, comp, exch); #else - return _InterlockedCompareExchange8((volatile char*)dest, exch, comp) == comp; + return (uint8_t)_InterlockedCompareExchange8((volatile char*)dest, exch, comp) == comp; #endif } static __forceinline bool InterlockedCompareExchangeTest(volatile uint16_t* dest, uint16_t exch, uint16_t comp) @@ -127,7 +127,7 @@ static __forceinline bool InterlockedCompareExchangeTest(volatile uint16_t* dest #if defined(__GNUG__) return __sync_bool_compare_and_swap(dest, comp, exch); #else - return _InterlockedCompareExchange16((volatile short*)dest, exch, comp) == comp; + return (uint16_t)_InterlockedCompareExchange16((volatile short*)dest, exch, comp) == comp; #endif } static __forceinline bool InterlockedCompareExchangeTest(volatile uint32_t* dest, uint32_t exch, uint32_t comp) @@ -135,7 +135,7 @@ static __forceinline bool InterlockedCompareExchangeTest(volatile uint32_t* dest #if defined(__GNUG__) return __sync_bool_compare_and_swap(dest, comp, exch); #else - return _InterlockedCompareExchange((volatile long*)dest, exch, comp) == comp; + return (uint32_t)_InterlockedCompareExchange((volatile long*)dest, exch, comp) == comp; #endif } static __forceinline bool InterlockedCompareExchangeTest(volatile uint64_t* dest, uint64_t exch, uint64_t comp) @@ -143,7 +143,7 @@ static __forceinline bool InterlockedCompareExchangeTest(volatile uint64_t* dest #if defined(__GNUG__) return __sync_bool_compare_and_swap(dest, comp, exch); #else - return _InterlockedCompareExchange64((volatile long long*)dest, exch, comp) == comp; + return (uint64_t)_InterlockedCompareExchange64((volatile long long*)dest, exch, comp) == comp; #endif }