From 20a581dfd50a4de4b4d1935893aa41e5ea64d32f Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 18 Jan 2017 11:58:42 +0300 Subject: Eliminate 'GC_collecting is set but never used' code defect (Win32) * include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS] (GC_collecting): Do not declare if GC_WIN32_THREADS. * include/private/gc_locks.h [USE_PTHREAD_LOCKS && GC_PTHREADS] (ENTER_GC, EXIT_GC): Do not define if GC_WIN32_THREADS; remove trailing ';', add cast to void. * win32_threads.c [USE_PTHREAD_LOCKS] (GC_collecting): Remove definition. --- win32_threads.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'win32_threads.c') diff --git a/win32_threads.c b/win32_threads.c index 1527ba3c..263ba588 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -2838,11 +2838,6 @@ GC_INNER void GC_init_parallel(void) /* pthread_mutex_trylock may not win here, */ /* due to builtin support for spinning first? */ - GC_INNER volatile GC_bool GC_collecting = 0; - /* A hint that we're in the collector and */ - /* holding the allocation lock for an */ - /* extended period. */ - GC_INNER void GC_lock(void) { pthread_mutex_lock(&GC_allocate_ml); -- cgit v1.2.1