* win32_threads.c [GC_PTHREADS && GC_WIN32_PTHREADS] (GC_pthread_join):
Declare t local variable in the block where the variable is used.
GC_API int GC_pthread_join(pthread_t pthread_id, void **retval)
{
int result;
- GC_thread t;
+# ifndef GC_WIN32_PTHREADS
+ GC_thread t;
+# endif
DCL_LOCK_STATE;
GC_ASSERT(!GC_win32_dll_threads);
if (0 == result) {
# ifdef GC_WIN32_PTHREADS
/* pthreads-win32 and winpthreads id are unique (not recycled). */
- t = GC_lookup_pthread(pthread_id);
+ GC_thread t = GC_lookup_pthread(pthread_id);
if (NULL == t) ABORT("Thread not registered");
# endif