Fix AO_compare_and_swap (gcc/alpha.h) to suppress compiler warning
authorIvan Maidanski <ivmai@mail.ru>
Fri, 21 Oct 2011 08:47:06 +0000 (12:47 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 21 Oct 2011 08:47:06 +0000 (12:47 +0400)
* src/atomic_ops/sysdeps/gcc/alpha.h (AO_compare_and_swap): Cast
returned value to int.

src/atomic_ops/sysdeps/gcc/alpha.h

index 8a7bc2c..61d0433 100644 (file)
@@ -58,6 +58,6 @@ AO_compare_and_swap(volatile AO_t *addr,
                      :"=&r" (temp), "=m" (*addr), "=&r" (was_equal)
                      : "r" (new_val), "Ir" (old)
                      :"memory");
-  return was_equal;
+  return (int)was_equal;
 }
 #define AO_HAVE_compare_and_swap