This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] ARM: Fix compiler warnings from atomic.h
- From: Will Newton <will dot newton at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 4 Jul 2014 16:14:20 +0100
- Subject: [PATCH] ARM: Fix compiler warnings from atomic.h
- Authentication-results: sourceware.org; auth=none
__arch_compare_and_exchange_bool_*_int return a boolean so in the
dummy implementations for 8, 16 and 64 bits return zero rather than
oldval. Zero is used rather than TRUE or FALSE to avoid needing to
including any headers for these dummy functions.
ChangeLog:
2014-07-04 Will Newton <will.newton@linaro.org>
* sysdeps/arm/bits/atomic.h
(__arch_compare_and_exchange_bool_8_int): Evaluate to zero.
(__arch_compare_and_exchange_bool_16_int): Likewise.
(__arch_compare_and_exchange_bool_64_int): Likewise.
---
sysdeps/arm/bits/atomic.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h
index c2d5be5..88cbe67 100644
--- a/sysdeps/arm/bits/atomic.h
+++ b/sysdeps/arm/bits/atomic.h
@@ -96,10 +96,10 @@ void __arm_link_error (void);
For all "bool" routines, we return FALSE if exchange succesful. */
# define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \
- ({__arm_link_error (); oldval; })
+ ({__arm_link_error (); 0; })
# define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \
- ({__arm_link_error (); oldval; })
+ ({__arm_link_error (); 0; })
# define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \
({ \
@@ -109,7 +109,7 @@ void __arm_link_error (void);
})
# define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \
- ({__arm_link_error (); oldval; })
+ ({__arm_link_error (); 0; })
# define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \
({__arm_link_error (); oldval; })
--
1.9.3