From: Mathieu Desnoyers Date: Mon, 27 Jun 2011 21:07:25 +0000 (-0400) Subject: uatomic: fix warning about unused variable X-Git-Tag: v0.6.3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c94627b55591d11b45e7aba6cc32d2e541d710d1;p=userspace-rcu.git uatomic: fix warning about unused variable Fix: compat_arch_x86.c: In function '_compat_uatomic_set': compat_arch_x86.c:104:16: warning: variable 'result' set but not used [-Wunused-but-set-variable] Signed-off-by: Mathieu Desnoyers --- diff --git a/compat_arch_x86.c b/compat_arch_x86.c index e882a4a..714201b 100644 --- a/compat_arch_x86.c +++ b/compat_arch_x86.c @@ -122,10 +122,11 @@ unsigned long _compat_uatomic_set(void *addr, unsigned long _new, int len) * generate an illegal instruction. Cannot catch this with * linker tricks when optimizations are disabled. */ + result = 0; __asm__ __volatile__("ud2"); } mutex_lock_signal_restore(&compat_mutex, &mask); - return _new; + return result; } unsigned long _compat_uatomic_xchg(void *addr, unsigned long _new, int len)