From 4ee84d3804a075724ce37b3034c43ca040642f82 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 17 Aug 2017 12:08:47 +0300 Subject: [PATCH] Remove unused variable in remove_all_threads_but_me (revert commit c2e05dd) * pthread_support.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC && USE_CUSTOM_SPECIFIC] (GC_remove_all_threads_but_me): Remove "res" local variable. --- ChangeLog | 1 - pthread_support.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f922238..793a05a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,7 +23,6 @@ * Eliminate 'possible loss of data' compiler warnings (MS VC) * Eliminate 'printf format specifier mismatch' compiler warning (tools) * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC) -* Eliminate 'unused variable' compiler warning in remove_all_threads_but_me * Eliminate 'value stored is never read' warning of Clang static analyzer * Eliminate duplicate log messages in GC_mark_from * Ensure GC initialized when atfork_prepare is called by client diff --git a/pthread_support.c b/pthread_support.c index cc8d3f50..5715f897 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -673,16 +673,12 @@ STATIC void GC_remove_all_threads_but_me(void) me -> kernel_id = gettid(); # endif # if defined(THREAD_LOCAL_ALLOC) && !defined(USE_CUSTOM_SPECIFIC) - { - int res; - /* Some TLS implementations might be not fork-friendly, so */ /* we re-assign thread-local pointer to 'tlfs' for safety */ /* instead of the assertion check (again, it is OK to call */ /* GC_destroy_thread_local and GC_free_internal before). */ if (GC_setspecific(GC_thread_key, &me->tlfs) != 0) ABORT("GC_setspecific failed (in child)"); - } # endif } else { # ifdef THREAD_LOCAL_ALLOC -- 2.40.0