From 0d6d8e01c82cf31ec6e09137d350e0b0e692bab2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 28 Nov 2016 10:27:18 +0100 Subject: [PATCH] threads: fix -Wshadow warnings --- src/threads.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/threads.h b/src/threads.h index 213b064243..6a1329dea2 100644 --- a/src/threads.h +++ b/src/threads.h @@ -216,47 +216,47 @@ enum { #define SCGetThreadIdLong(...) ({ \ long tmpthid; \ thr_self(&tmpthid); \ - u_long tid = (u_long)tmpthid; \ - tid; \ + u_long _scgetthread_tid = (u_long)tmpthid; \ + _scgetthread_tid; \ }) #elif __OpenBSD__ #define SCGetThreadIdLong(...) ({ \ pid_t tpid; \ tpid = getpid(); \ - u_long tid = (u_long)tpid; \ - tid; \ + u_long _scgetthread_tid = (u_long)tpid; \ + _scgetthread_tid; \ }) #elif __CYGWIN__ #define SCGetThreadIdLong(...) ({ \ - u_long tid = (u_long)GetCurrentThreadId(); \ - tid; \ + u_long _scgetthread_tid = (u_long)GetCurrentThreadId(); \ + _scgetthread_tid; \ }) #elif OS_WIN32 #define SCGetThreadIdLong(...) ({ \ - u_long tid = (u_long)GetCurrentThreadId(); \ - tid; \ + u_long _scgetthread_tid = (u_long)GetCurrentThreadId(); \ + _scgetthread_tid; \ }) #elif OS_DARWIN #define SCGetThreadIdLong(...) ({ \ thread_port_t tpid; \ tpid = mach_thread_self(); \ - u_long tid = (u_long)tpid; \ - tid; \ + u_long _scgetthread_tid = (u_long)tpid; \ + _scgetthread_tid; \ }) #elif defined(sun) #include #define SCGetThreadIdLong(...) ({ \ thread_t tmpthid = thr_self(); \ - u_long tid = (u_long)tmpthid; \ - tid; \ + u_long _scgetthread_tid = (u_long)tmpthid; \ + _scgetthread_tid; \ }) #else #define SCGetThreadIdLong(...) ({ \ pid_t tmpthid; \ tmpthid = syscall(SYS_gettid); \ - u_long tid = (u_long)tmpthid; \ - tid; \ + u_long _scgetthread_tid = (u_long)tmpthid; \ + _scgetthread_tid; \ }) #endif /* OS FREEBSD */