In several cases the return from __sync_fetch_and_* is ignored
and external builds were throwing errors when -Werror was used.

Indicate via the standard (void) cast that the
return from the call can be ignored.

Change-Id: I944cbaf25f5e7ecadf01d206fcc0c74935183780
Signed-off-by: Ronald G. Minnich <[email protected]>
---
 user/parlib/include/parlib/x86/atomic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/user/parlib/include/parlib/x86/atomic.h 
b/user/parlib/include/parlib/x86/atomic.h
index da31c58..1ecd3e2 100644
--- a/user/parlib/include/parlib/x86/atomic.h
+++ b/user/parlib/include/parlib/x86/atomic.h
@@ -41,12 +41,12 @@ static inline void atomic_set(atomic_t *number, long val)
 
 static inline void atomic_inc(atomic_t *number)
 {
-       __sync_fetch_and_add(number, 1);
+       (void)__sync_fetch_and_add(number, 1);
 }
 
 static inline void atomic_dec(atomic_t *number)
 {
-       __sync_fetch_and_sub(number, 1);
+       (void)__sync_fetch_and_sub(number, 1);
 }
 
 static inline long atomic_fetch_and_add(atomic_t *number, long val)
@@ -88,12 +88,12 @@ static inline bool atomic_cas_u32(uint32_t *addr, uint32_t 
exp_val,
 
 static inline void atomic_andb(volatile uint8_t *number, uint8_t mask)
 {
-       __sync_fetch_and_and(number, mask);
+       (void)__sync_fetch_and_and(number, mask);
 }
 
 static inline void atomic_orb(volatile uint8_t *number, uint8_t mask)
 {
-       __sync_fetch_and_or(number, mask);
+       (void)__sync_fetch_and_or(number, mask);
 }
 
 __END_DECLS
-- 
2.8.0.rc3.226.g39d4020

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to