]> granicus.if.org Git - libatomic_ops/commitdiff
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 08c0a7639482fb1af900bd08e88a23a12b7369fc..c8980821eacf958b3042986ef398b6e3b1bc82e0 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