Skip to contentSkip to conversation

s390: Fix gcc warning about unused return values.

PATCH In review Martin Schwidefsky 1 participant 1 message Jul 18, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 s390: Fix gcc warning about unused return values.

From: Heiko Carstens <[email protected]>

[S390] Fix gcc warning about unused return values.

---

 include/asm-s390/system.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
include/asm-s390/system.h +7 -2
diff -urpN linux-2.6/include/asm-s390/system.h linux-2.6-patched/include/asm-s390/system.h
@@ -128,8 +128,13 @@ extern void account_system_vtime(struct 
 
 #define nop() __asm__ __volatile__ ("nop")
 
-#define xchg(ptr,x) \
-  ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(void *)(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x)							  \
+({									  \
+	__typeof__(*(ptr)) __ret;					  \
+	__ret = (__typeof__(*(ptr)))					  \
+		__xchg((unsigned long)(x), (void *)(ptr),sizeof(*(ptr))); \
+	__ret;								  \
+})
 
 static inline unsigned long __xchg(unsigned long x, void * ptr, int size)
 {