mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress warnings on mingw32
* atomic.h (ATOMIC_SIZE_): cast to suppress warnings on mingw32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
349ea593b6
commit
66f4c3f18c
1 changed files with 5 additions and 5 deletions
10
atomic.h
10
atomic.h
|
@ -37,11 +37,11 @@ rb_w32_atomic_or(volatile rb_atomic_t *var, rb_atomic_t val)
|
|||
# define ATOMIC_SIZE_DEC(var) InterlockedDecrement64(&(var))
|
||||
# define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange64(&(var), (val))
|
||||
# else
|
||||
# define ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd(&(var), (val))
|
||||
# define ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd(&(var), -(val))
|
||||
# define ATOMIC_SIZE_INC(var) InterlockedIncrement(&(var))
|
||||
# define ATOMIC_SIZE_DEC(var) InterlockedDecrement(&(var))
|
||||
# define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange(&(var), (val))
|
||||
# define ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd((LONG *)&(var), (val))
|
||||
# define ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd((LONG *)&(var), -(val))
|
||||
# define ATOMIC_SIZE_INC(var) InterlockedIncrement((LONG *)&(var))
|
||||
# define ATOMIC_SIZE_DEC(var) InterlockedDecrement((LONG *)&(var))
|
||||
# define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange((LONG *)&(var), (val))
|
||||
# endif
|
||||
|
||||
#elif defined HAVE_GCC_ATOMIC_BUILTINS
|
||||
|
|
Loading…
Reference in a new issue