From 03434f8f106c4a1a828bf0298283fd47de0da3e1 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 7 Nov 2008 16:27:05 +0000 Subject: [PATCH] Some compilers complain about casting a pointer to a integer type with a different size. The correct way is to cast to an integer type that has the same length, and then allow the compiler to upgrade to the read type. This commit was SVN r19944. --- opal/include/opal/sys/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/include/opal/sys/atomic.h b/opal/include/opal/sys/atomic.h index be473e6984..ab4c391cb7 100644 --- a/opal/include/opal/sys/atomic.h +++ b/opal/include/opal/sys/atomic.h @@ -521,8 +521,8 @@ static inline int opal_atomic_cmpset_rel_ptr(volatile void* addr, * See opal_atomic_cmpset_* for pseudo-code. */ #define opal_atomic_cmpset( ADDR, OLDVAL, NEWVAL ) \ - opal_atomic_cmpset_xx( (volatile void*)(ADDR), (int64_t)(OLDVAL), \ - (int64_t)(NEWVAL), sizeof(*(ADDR)) ) + opal_atomic_cmpset_xx( (volatile void*)(ADDR), (intptr_t)(OLDVAL), \ + (intptr_t)(NEWVAL), sizeof(*(ADDR)) ) /** * Atomic compare and set of pointer with acquire semantics. This