Revert "Eliminate 'deref-of-null' static analyzer warning in register_finalizer"
authorIvan Maidanski <ivmai@mail.ru>
Sat, 29 Oct 2016 14:40:01 +0000 (17:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 29 Oct 2016 14:40:01 +0000 (17:40 +0300)
This reverts commit 7547c377153ddd859bef6a2dd14c42e9f12aa0be.

Because it requires -D GC_ASSERTIONS.

finalize.c

index 9f03f81..3de2a9c 100644 (file)
@@ -699,8 +699,7 @@ STATIC void GC_register_finalizer_inner(void * obj,
         curr_fo = fo_next(curr_fo);
       }
       if (EXPECT(new_fo != 0, FALSE)) {
-        /* new_fo is returned by GC_oom_fn().   */
-        GC_ASSERT(fn != 0 && hhdr != NULL);
+        /* new_fo is returned by GC_oom_fn(), so fn != 0 and hhdr != 0. */
         break;
       }
       if (fn == 0) {