diff options
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/mips/bits/atomic.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/mips/bits/atomic.h b/libc/sysdeps/linux/mips/bits/atomic.h index 60ee0a6f8..e4f9e3b73 100644 --- a/libc/sysdeps/linux/mips/bits/atomic.h +++ b/libc/sysdeps/linux/mips/bits/atomic.h @@ -83,10 +83,10 @@ typedef uintmax_t uatomic_max_t; in which values are returned. */ #define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \ - (abort (), __prev = __cmp = 0) + (abort (), __prev = 0, __cmp = 0) #define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \ - (abort (), __prev = __cmp = 0) + (abort (), __prev = 0, __cmp = 0) #define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \ __asm__ __volatile__ ( \ @@ -110,7 +110,7 @@ typedef uintmax_t uatomic_max_t; #if _MIPS_SIM == _ABIO32 /* We can't do an atomic 64-bit operation in O32. */ #define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \ - (abort (), __prev = __cmp = 0) + (abort (), __prev = 0, __cmp = 0) #else #define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \ __asm__ __volatile__ ("\n" \ @@ -158,22 +158,22 @@ typedef uintmax_t uatomic_max_t; successful or not. */ #define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \ -({ __typeof (*mem) __prev attribute_unused; int __cmp; \ +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \ __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \ (__typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \ -({ __typeof (*mem) __prev attribute_unused; int __cmp; \ +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \ __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \ (__typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \ -({ __typeof (*mem) __prev attribute_unused; int __cmp; \ +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \ __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \ (__typeof (*mem))__prev; }) #define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \ -({ __typeof (*mem) __prev attribute_unused; int __cmp; \ +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \ __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \ (__typeof (*mem))__prev; }) |