diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-04-22 05:43:00 +0000 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2010-04-22 08:50:05 -0700 |
commit | dfedf78cc696bb51069ca591c3be8f05018d5be1 (patch) | |
tree | 7e26015d33c03b47e0a73a42677d1b70156cee3d /libpthread | |
parent | 744842bf666f31cfdd355598c244cef2487eded4 (diff) | |
download | uClibc-alpine-dfedf78cc696bb51069ca591c3be8f05018d5be1.tar.bz2 uClibc-alpine-dfedf78cc696bb51069ca591c3be8f05018d5be1.tar.xz |
nptl: fix warnings of shadowing __self
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 <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread')
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 \ |