From: Andreas Schwab Date: Wed, 8 Aug 2012 08:39:05 +0000 (+0200) Subject: m68k/cf: avoid warning in non-shared atomic_compare_and_exchange_val_acq X-Git-Tag: upstream/2.16.90~739 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b7d2b398e49a0661d0a8663c75e2cc7b8e52560;p=platform%2Fupstream%2Fglibc.git m68k/cf: avoid warning in non-shared atomic_compare_and_exchange_val_acq --- diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k index cf3d251..e4fccd2 100644 --- a/ports/ChangeLog.m68k +++ b/ports/ChangeLog.m68k @@ -1,3 +1,9 @@ +2012-08-08 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h + (atomic_compare_and_exchange_val_acq) [!SHARED]: Add cast to avoid + warning. + 2012-08-07 Joseph Myers * sysdeps/unix/sysv/linux/m68k/configure.in (arch_minimum_kernel): diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h index b088a72..23ef447 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h +++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Copyright (C) 2010-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov , 2010. @@ -42,8 +42,8 @@ typedef uintmax_t uatomic_max_t; #ifdef SHARED # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ ({ \ - /* Use temporary variables to workaround call-clobberness of */ \ - /* the registers. */ \ + /* Use temporary variables to workaround call-clobberness of \ + the registers. */ \ __typeof (mem) _mem = mem; \ __typeof (oldval) _oldval = oldval; \ __typeof (newval) _newval = newval; \ @@ -65,13 +65,13 @@ typedef uintmax_t uatomic_max_t; #else # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ ({ \ - /* Use temporary variables to workaround call-clobberness of */ \ - /* the registers. */ \ + /* Use temporary variables to workaround call-clobberness of \ + the registers. */ \ __typeof (mem) _mem = mem; \ __typeof (oldval) _oldval = oldval; \ __typeof (newval) _newval = newval; \ register __typeof (oldval) _d0 asm ("d0") \ - = SYS_ify (atomic_cmpxchg_32); \ + = (__typeof (oldval)) SYS_ify (atomic_cmpxchg_32); \ register __typeof (mem) _a0 asm ("a0") = _mem; \ register __typeof (oldval) _d2 asm ("d2") = _oldval; \ register __typeof (newval) _d1 asm ("d1") = _newval; \