From: Thorsten Glaser Date: Mon, 17 Oct 2011 09:29:32 +0000 (+0400) Subject: Fix AO_test_and_set_full on m68k X-Git-Tag: libatomic_ops-7_3alpha2~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19716964ab1f6c33e834a922501f241be7b883e2;p=libatomic_ops Fix AO_test_and_set_full on m68k * src/atomic_ops/sysdeps/gcc/m68k.h (AO_test_and_set_full): Cast the returned value. --- diff --git a/src/atomic_ops/sysdeps/gcc/m68k.h b/src/atomic_ops/sysdeps/gcc/m68k.h index 08c0a76..c898082 100644 --- a/src/atomic_ops/sysdeps/gcc/m68k.h +++ b/src/atomic_ops/sysdeps/gcc/m68k.h @@ -42,7 +42,8 @@ AO_test_and_set_full(volatile AO_TS_t *addr) { : "=d" (oldval), "=m" (*addr) : "m" (*addr) : "memory"); - return oldval; + /* This cast works due to the above. */ + return (AO_TS_VAL_t)oldval; } #define AO_HAVE_test_and_set_full