From: Mathieu Desnoyers Date: Tue, 14 Jun 2011 12:55:44 +0000 (-0400) Subject: Fix generic atomic ops and/or: add missing return X-Git-Tag: v0.6.2~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e6e5957d053147ab7d31517efb91e246e64b2927;p=userspace-rcu.git Fix generic atomic ops and/or: add missing return Fixes build on powerpc: ./urcu/uatomic/generic.h: In function '_uatomic_and': ./urcu/uatomic/generic.h:310:2: warning: 'return' with a value, in function returning void ./urcu/uatomic/generic.h: In function '_uatomic_or': ./urcu/uatomic/generic.h:374:2: warning: 'return' with a value, in function returning void Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/uatomic/generic.h b/urcu/uatomic/generic.h index 337fe40..4a57051 100644 --- a/urcu/uatomic/generic.h +++ b/urcu/uatomic/generic.h @@ -269,6 +269,8 @@ void _uatomic_and(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old & val, 1); } while (oldt != old); + + return; } #endif #ifdef UATOMIC_HAS_ATOMIC_SHORT @@ -292,6 +294,8 @@ void _uatomic_and(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old & val, 4); } while (oldt != old); + + return; } #if (CAA_BITS_PER_LONG == 64) case 8: @@ -303,11 +307,12 @@ void _uatomic_and(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old & val, 8); } while (oldt != old); + + return; } #endif } _uatomic_link_error(); - return 0; } #define uatomic_and(addr, v) \ @@ -333,6 +338,8 @@ void _uatomic_or(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old | val, 1); } while (oldt != old); + + return; } #endif #ifdef UATOMIC_HAS_ATOMIC_SHORT @@ -345,6 +352,8 @@ void _uatomic_or(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old | val, 2); } while (oldt != old); + + return; } #endif case 4: @@ -356,6 +365,8 @@ void _uatomic_or(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old | val, 4); } while (oldt != old); + + return; } #if (CAA_BITS_PER_LONG == 64) case 8: @@ -367,11 +378,12 @@ void _uatomic_or(void *addr, unsigned long val, int len) old = oldt; oldt = _uatomic_cmpxchg(addr, old, old | val, 8); } while (oldt != old); + + return; } #endif } _uatomic_link_error(); - return 0; } #define uatomic_or(addr, v) \