[前][次][番号順一覧][スレッド一覧]

ruby-changes:30022

From: nobu <ko1@a...>
Date: Fri, 19 Jul 2013 22:31:27 +0900 (JST)
Subject: [ruby-changes:30022] nobu:r42074 (trunk): gc.c: suppress warning

nobu	2013-07-19 22:31:03 +0900 (Fri, 19 Jul 2013)

  New Revision: 42074

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42074

  Log:
    gc.c: suppress warning
    
    * gc.c (heap_assign_slot): suppress implicit conversion warning.
      delta is not greater than sizeof(RVALUE).

  Modified files:
    trunk/gc.c

Index: gc.c
===================================================================
--- gc.c	(revision 42073)
+++ gc.c	(revision 42074)
@@ -761,7 +761,7 @@ heap_assign_slot(rb_objspace_t *objspace https://github.com/ruby/ruby/blob/trunk/gc.c#L761
     /* adjust obj_limit (object number available in this slot) */
     start = (RVALUE*)((VALUE)slot_body + sizeof(struct heap_slot_header));
     if ((VALUE)start % sizeof(RVALUE) != 0) {
-	int delta = sizeof(RVALUE) - ((VALUE)start % sizeof(RVALUE));
+	int delta = (int)(sizeof(RVALUE) - ((VALUE)start % sizeof(RVALUE)));
 	start = (RVALUE*)((VALUE)start + delta);
 	limit = (HEAP_SIZE - (size_t)((VALUE)start - (VALUE)slot_body))/sizeof(RVALUE);
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]