From: Ivan Maidanski Date: Tue, 23 May 2017 07:17:12 +0000 (+0300) Subject: Eliminate 'conditional expression is always true' code defect in GC_init X-Git-Tag: v7.4.6~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc2f0f6a18a392c8e4c07e876d948fda671b024d;p=gc 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. --- 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