From 2e54fe9d4dd4569032590d0cf1bcea472d422c91 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 10 Mar 2009 05:43:14 +0000 Subject: * array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def, missing/crypt.c, missing/vsnprintf.c, : suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 80cd62ee2d..593d0a35ac 100644 --- a/gc.c +++ b/gc.c @@ -937,7 +937,7 @@ init_heap(rb_objspace_t *objspace) static void set_heaps_increment(rb_objspace_t *objspace) { - size_t next_heaps_length = heaps_used * 1.8; + size_t next_heaps_length = (size_t)(heaps_used * 1.8); heaps_inc = next_heaps_length - heaps_used; if (next_heaps_length > heaps_length) { @@ -1712,8 +1712,8 @@ gc_sweep(rb_objspace_t *objspace) size_t i; size_t live = 0, free_min = 0, do_heap_free = 0; - do_heap_free = (heaps_used * HEAP_OBJ_LIMIT) * 0.65; - free_min = (heaps_used * HEAP_OBJ_LIMIT) * 0.2; + do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65); + free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2); if (free_min < FREE_MIN) { do_heap_free = heaps_used * HEAP_OBJ_LIMIT; @@ -1776,7 +1776,7 @@ gc_sweep(rb_objspace_t *objspace) } GC_PROF_SET_MALLOC_INFO; if (malloc_increase > malloc_limit) { - malloc_limit += (malloc_increase - malloc_limit) * (double)live / (live + freed); + malloc_limit += (size_t)((malloc_increase - malloc_limit) * (double)live / (live + freed)); if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT; } malloc_increase = 0; -- cgit v1.2.3