]> granicus.if.org Git - gc/commitdiff
Remove unused variable in remove_all_threads_but_me
authorIvan Maidanski <ivmai@mail.ru>
Thu, 17 Aug 2017 09:08:47 +0000 (12:08 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 17 Aug 2017 09:16:31 +0000 (12:16 +0300)
(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
pthread_support.c

index 1f922238160d15b89bc61d8ceffc3c4c0023106c..793a05a94eb81ac63743f8915dd53a0c042d0fae 100644 (file)
--- 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
index cc8d3f50b3fa665b8ef8b643de7d5c4623fe0397..5715f8979388ec5ca4e2b67801c20cc33ef9cffd 100644 (file)
@@ -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