]> granicus.if.org Git - gc/commitdiff
Eliminate 'conditional expression is always true' code defect in GC_init
authorIvan Maidanski <ivmai@mail.ru>
Tue, 23 May 2017 07:17:12 +0000 (10:17 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 24 May 2017 22:31:35 +0000 (01:31 +0300)
* misc.c (GC_init): Move ALIGNMENT>GC_DS_TAGS expression from
"if" statement to #if.

misc.c

diff --git a/misc.c b/misc.c
index f0dc74b8401130e2cc0879eefd34013283364d55..17ba5186d85767da423ae6734ad0ced427f6706a 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -1078,10 +1078,11 @@ GC_API void GC_CALL GC_init(void)
       }
 #   endif
     maybe_install_looping_handler();
-    /* Adjust normal object descriptor for extra allocation.    */
-    if (ALIGNMENT > GC_DS_TAGS && EXTRA_BYTES != 0) {
-      GC_obj_kinds[NORMAL].ok_descriptor = ((word)(-ALIGNMENT) | GC_DS_LENGTH);
-    }
+#   if ALIGNMENT > GC_DS_TAGS
+      /* Adjust normal object descriptor for extra allocation.  */
+      if (EXTRA_BYTES != 0)
+        GC_obj_kinds[NORMAL].ok_descriptor = (word)(-ALIGNMENT) | GC_DS_LENGTH;
+#   endif
     GC_exclude_static_roots_inner(beginGC_arrays, endGC_arrays);
     GC_exclude_static_roots_inner(beginGC_obj_kinds, endGC_obj_kinds);
 #   ifdef SEPARATE_GLOBALS