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

ruby-changes:36185

From: nobu <ko1@a...>
Date: Tue, 4 Nov 2014 16:25:49 +0900 (JST)
Subject: [ruby-changes:36185] nobu:r48266 (trunk): suppress warnings

nobu	2014-11-04 16:25:41 +0900 (Tue, 04 Nov 2014)

  New Revision: 48266

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

  Log:
    suppress warnings
    
    * vm.c (rb_vm_make_proc): cast to suppress warning by VC6.
    
    * ext/-test-/win32/console/attribute.c (console_set_attribute):
      ditto.

  Modified files:
    trunk/ext/-test-/win32/console/attribute.c
    trunk/vm.c
Index: ext/-test-/win32/console/attribute.c
===================================================================
--- ext/-test-/win32/console/attribute.c	(revision 48265)
+++ ext/-test-/win32/console/attribute.c	(revision 48266)
@@ -25,7 +25,7 @@ console_set_attribute(VALUE io, VALUE at https://github.com/ruby/ruby/blob/trunk/ext/-test-/win32/console/attribute.c#L25
     HANDLE h = (HANDLE)rb_w32_get_osfhandle(fd);
 
     if (h == (HANDLE)-1) rb_raise(rb_eIOError, "invalid io");
-    SetConsoleTextAttribute(h, NUM2INT(attr));
+    SetConsoleTextAttribute(h, (WORD)NUM2INT(attr));
     return Qnil;
 }
 
Index: vm.c
===================================================================
--- vm.c	(revision 48265)
+++ vm.c	(revision 48266)
@@ -677,7 +677,7 @@ rb_vm_make_proc(rb_thread_t *th, const r https://github.com/ruby/ruby/blob/trunk/vm.c#L677
     }
 
     procval = rb_proc_alloc(klass, block, envval, blockprocval,
-			    th->safe_level, 0, 0);
+			    (int8_t)th->safe_level, 0, 0);
 
     if (VMDEBUG) {
 	if (th->stack < block->ep && block->ep < th->stack + th->stack_size) {

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

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