From 293173f87072bbc0cafc457d5d8a6039f4d1d259 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 20 Mar 2011 02:21:38 +0100 Subject: pthreadP.h: avoid shadow warnings Change CANCELLATION_P macro and adapt usage. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/pthreadP.h | 2 +- libpthread/nptl/pthread_testcancel.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'libpthread/nptl') diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h index 850562b1f..ae24afd0c 100644 --- a/libpthread/nptl/pthreadP.h +++ b/libpthread/nptl/pthreadP.h @@ -221,7 +221,7 @@ extern int __pthread_debug attribute_hidden; /* Cancellation test. */ #define CANCELLATION_P(self) \ do { \ - int cancelhandling = THREAD_GETMEM (self, cancelhandling); \ + cancelhandling = THREAD_GETMEM (self, cancelhandling); \ if (CANCEL_ENABLED_AND_CANCELED (cancelhandling)) \ { \ THREAD_SETMEM (self, result, PTHREAD_CANCELED); \ diff --git a/libpthread/nptl/pthread_testcancel.c b/libpthread/nptl/pthread_testcancel.c index e9b17b493..fbd597a77 100644 --- a/libpthread/nptl/pthread_testcancel.c +++ b/libpthread/nptl/pthread_testcancel.c @@ -24,5 +24,6 @@ void pthread_testcancel (void) { + int cancelhandling; CANCELLATION_P (THREAD_SELF); } -- cgit v1.2.3