From dfedf78cc696bb51069ca591c3be8f05018d5be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 22 Apr 2010 05:43:00 +0000 Subject: nptl: fix warnings of shadowing __self MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stdio locking macroes do: void *__self = THREAD_SELF; But THREAD_SELF uses __self also internally which causes shadowing warnings. Just rename the outer variable for now. Might be an idea to convert the macroes to static inline functions. Signed-off-by: Timo Teräs Signed-off-by: Austin Foxley --- libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libpthread/nptl') diff --git a/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h b/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h index b8efdd8d5..3437e6166 100644 --- a/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h +++ b/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h @@ -39,11 +39,11 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; #define _IO_lock_lock(_name) \ do { \ - void *__self = THREAD_SELF; \ - if ((_name).owner != __self) \ + void *__meself = THREAD_SELF; \ + if ((_name).owner != __meself) \ { \ lll_lock ((_name).lock, LLL_PRIVATE); \ - (_name).owner = __self; \ + (_name).owner = __meself; \ } \ ++(_name).cnt; \ } while (0) @@ -51,12 +51,12 @@ typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; #define _IO_lock_trylock(_name) \ ({ \ int __result = 0; \ - void *__self = THREAD_SELF; \ - if ((_name).owner != __self) \ + void *__meself = THREAD_SELF; \ + if ((_name).owner != __meself) \ { \ if (lll_trylock ((_name).lock) == 0) \ { \ - (_name).owner = __self; \ + (_name).owner = __meself; \ (_name).cnt = 1; \ } \ else \ -- cgit v1.2.3