From bc2f0f6a18a392c8e4c07e876d948fda671b024d Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 23 May 2017 10:17:12 +0300 Subject: [PATCH] Eliminate 'conditional expression is always true' code defect in GC_init * misc.c (GC_init): Move ALIGNMENT>GC_DS_TAGS expression from "if" statement to #if. --- misc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc.c b/misc.c index f0dc74b8..17ba5186 100644 --- 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 -- 2.40.0