From 25646764e33fd302bcced45fb8aedd665f3bbff3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 17 Feb 2016 10:42:57 +0300 Subject: [PATCH] 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). --- misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.c b/misc.c index d28d3d81..b4550e16 100644 --- a/misc.c +++ b/misc.c @@ -236,7 +236,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 */ -- 2.40.0