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

ruby-changes:34913

From: nobu <ko1@a...>
Date: Tue, 29 Jul 2014 17:22:50 +0900 (JST)
Subject: [ruby-changes:34913] nobu:r46996 (trunk): compile.c: suppress a warning

nobu	2014-07-29 17:22:33 +0900 (Tue, 29 Jul 2014)

  New Revision: 46996

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

  Log:
    compile.c: suppress a warning
    
    * compile.c (compile_data_alloc): cast to suppress a warning by
      apple gcc-4.2.  it doesn't cause an error but a warning in spite
      of -Werror=shorten-64-to-32 option, for some reason.

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 46995)
+++ compile.c	(revision 46996)
@@ -612,7 +612,7 @@ compile_data_alloc(rb_iseq_t *iseq, size https://github.com/ruby/ruby/blob/trunk/compile.c#L612
     }
 
     ptr = (void *)&storage->buff[storage->pos];
-    storage->pos += size;
+    storage->pos += (int)size;
     return ptr;
 }
 

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

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