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

ruby-changes:35498

From: nobu <ko1@a...>
Date: Sun, 14 Sep 2014 10:57:06 +0900 (JST)
Subject: [ruby-changes:35498] nobu:r47580 (trunk): compile.c, gc.c: suppress warnings

nobu	2014-09-14 10:56:53 +0900 (Sun, 14 Sep 2014)

  New Revision: 47580

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

  Log:
    compile.c, gc.c: suppress warnings
    
    * compile.c (iseq_compile_each): suppress implicit conversion
      warning by old apple gcc 4.2.
    
    * gc.c (RVALUE_FLAGS_AGE, heap_page_allocate): ditto.

  Modified files:
    trunk/compile.c
    trunk/gc.c
Index: compile.c
===================================================================
--- compile.c	(revision 47579)
+++ compile.c	(revision 47580)
@@ -4017,7 +4017,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/compile.c#L4017
 	DECL_ANCHOR(args);
 	VALUE argc;
 	unsigned int flag = 0;
-	VALUE asgnflag = 0;
+	unsigned int asgnflag = 0;
 	ID id = node->nd_mid;
 	int boff = 0;
 
Index: gc.c
===================================================================
--- gc.c	(revision 47579)
+++ gc.c	(revision 47580)
@@ -935,7 +935,7 @@ static void rgengc_rememberset_mark(rb_o https://github.com/ruby/ruby/blob/trunk/gc.c#L935
 static inline int
 RVALUE_FLAGS_AGE(VALUE flags)
 {
-    return (flags & (FL_PROMOTED0 | FL_PROMOTED1)) >> RVALUE_AGE_SHIFT;
+    return (int)((flags & (FL_PROMOTED0 | FL_PROMOTED1)) >> RVALUE_AGE_SHIFT);
 }
 
 #endif /* USE_RGENGC */
@@ -1396,7 +1396,7 @@ heap_page_allocate(rb_objspace_t *objspa https://github.com/ruby/ruby/blob/trunk/gc.c#L1396
     if ((VALUE)start % sizeof(RVALUE) != 0) {
 	int delta = (int)(sizeof(RVALUE) - ((VALUE)start % sizeof(RVALUE)));
 	start = (RVALUE*)((VALUE)start + delta);
-	limit = (HEAP_SIZE - (int)((VALUE)start - (VALUE)page_body))/sizeof(RVALUE);
+	limit = (HEAP_SIZE - (int)((VALUE)start - (VALUE)page_body))/(int)sizeof(RVALUE);
     }
     end = start + limit;
 

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

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