Fix AO_test_and_set_full on m68k
authorThorsten Glaser <tg@debian.org>
Mon, 17 Oct 2011 09:29:32 +0000 (13:29 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 17 Oct 2011 09:29:32 +0000 (13:29 +0400)
* src/atomic_ops/sysdeps/gcc/m68k.h (AO_test_and_set_full): Cast the
returned value.

src/atomic_ops/sysdeps/gcc/m68k.h

index 08c0a76..c898082 100644 (file)
@@ -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