From 089de40d5727a2a5478767e3b9c1a43bc46b7e46 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 14 Mar 2012 16:22:19 +0100 Subject: nptl: fix compiler warning due to unused-but-set-variable gcc 4.6.x raises useful warnings due to unused-but-set-variable, This patch fixes the following one by using properly preprocessor guard libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c: In function '__pthread_cond_timedwait': libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c:103:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Carmelo Amoroso --- libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libpthread') diff --git a/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c index 7f3675381..92c6f945f 100644 --- a/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c +++ b/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c @@ -100,8 +100,10 @@ __pthread_cond_timedwait ( { #ifdef __NR_clock_gettime INTERNAL_SYSCALL_DECL (err); - int ret; - ret = INTERNAL_SYSCALL (clock_gettime, err, 2, +# ifndef __ASSUME_POSIX_TIMERS + int ret = +# endif + INTERNAL_SYSCALL (clock_gettime, err, 2, (cond->__data.__nwaiters & ((1 << COND_NWAITERS_SHIFT) - 1)), &rt); -- cgit v1.2.3