From: Ivan Maidanski Date: Wed, 17 Feb 2016 07:42:57 +0000 (+0300) Subject: Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map X-Git-Tag: gc7_4_4~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b97c5f9f884f1d7ca862fb129ef57d6c9fa41c61;p=gc Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map * misc.c (GC_init_size_map): Cast ROUNDED_UP_GRANULES() result to unsigned int explicitly (which is, in turn, cast to size_t implicitly). --- diff --git a/misc.c b/misc.c index 73c4e21e..cf4763b8 100644 --- a/misc.c +++ b/misc.c @@ -232,7 +232,7 @@ STATIC void GC_init_size_map(void) /* This avoids problems at lower levels. */ GC_size_map[0] = 1; for (i = 1; i <= GRANULES_TO_BYTES(TINY_FREELISTS-1) - EXTRA_BYTES; i++) { - GC_size_map[i] = ROUNDED_UP_GRANULES(i); + GC_size_map[i] = (unsigned)ROUNDED_UP_GRANULES(i); # ifndef _MSC_VER GC_ASSERT(GC_size_map[i] < TINY_FREELISTS); /* Seems to tickle bug in VC++ 2008 for AMD64 */