From: Ivan Maidanski Date: Mon, 24 Oct 2011 15:05:31 +0000 (+0400) Subject: Fix AO_compare_and_swap_full (GCC MIPS, PowerPC) returned value type X-Git-Tag: libatomic_ops-7_3alpha2~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3200f81418cd264a998c21ad67a67e0cb5b900fc;p=libatomic_ops Fix AO_compare_and_swap_full (GCC MIPS, PowerPC) returned value type * src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap_full): Change "result" local variable type from AO_t to int. * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_compare_and_swap_full): Likewise. --- diff --git a/src/atomic_ops/sysdeps/gcc/mips.h b/src/atomic_ops/sysdeps/gcc/mips.h index 2e1e979..527a347 100644 --- a/src/atomic_ops/sysdeps/gcc/mips.h +++ b/src/atomic_ops/sysdeps/gcc/mips.h @@ -86,7 +86,7 @@ AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) { AO_INLINE int AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) { - AO_t result; + int result; AO_nop_full(); result = AO_compare_and_swap(addr, old, new_val); AO_nop_full(); diff --git a/src/atomic_ops/sysdeps/gcc/powerpc.h b/src/atomic_ops/sysdeps/gcc/powerpc.h index 2f90dc4..69ec05b 100644 --- a/src/atomic_ops/sysdeps/gcc/powerpc.h +++ b/src/atomic_ops/sysdeps/gcc/powerpc.h @@ -217,7 +217,7 @@ AO_compare_and_swap_release(volatile AO_t *addr, AO_t old, AO_t new_val) { AO_INLINE int AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) { - AO_t result; + int result; AO_lwsync(); result = AO_compare_and_swap(addr, old, new_val); AO_lwsync();