]> 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:38:46 +0000 (13:38 +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 ffa38d7f3088d90619012f4ebf23db8690e39538..e7d435ecb838ff1eda7bc67736356f2bd9d7d2ce 100644 (file)
@@ -43,7 +43,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