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

ruby-changes:61320

From: Kenta <ko1@a...>
Date: Fri, 22 May 2020 13:49:26 +0900 (JST)
Subject: [ruby-changes:61320] f4f157fc81 (master): Suppress warnings no inline ruby debug (#3107)

https://git.ruby-lang.org/ruby.git/commit/?id=f4f157fc81

From f4f157fc81b940c0f76a01ee266a08e6bba69b6b Mon Sep 17 00:00:00 2001
From: Kenta Murata <mrkn@u...>
Date: Fri, 22 May 2020 13:49:08 +0900
Subject: Suppress warnings no inline ruby debug (#3107)

* Suppress unused warnings occurred due to -fno-inline

* Suppress warning occurred due to RUBY_DEBUG=1

diff --git a/array.c b/array.c
index 90fad54..e5de084 100644
--- a/array.c
+++ b/array.c
@@ -5269,7 +5269,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/array.c#L5269
 flatten(VALUE ary, int level)
 {
     long i;
-    VALUE stack, result, tmp, elt, vmemo;
+    VALUE stack, result, tmp = 0, elt, vmemo;
     st_table *memo;
     st_data_t id;
 
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 999e1f5..b32a391 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1532,7 +1532,6 @@ strio_read(int argc, VALUE *argv, VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/stringio/stringio.c#L1532
     long len;
     int binary = 0;
 
-    rb_check_arity(argc, 0, 2);
     switch (argc) {
       case 2:
 	str = argv[1];
@@ -1572,6 +1571,8 @@ strio_read(int argc, VALUE *argv, VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/stringio/stringio.c#L1571
 	    len -= ptr->pos;
 	}
 	break;
+      default:
+        rb_error_arity(argc, 0, 2);
     }
     if (NIL_P(str)) {
 	rb_encoding *enc = binary ? rb_ascii8bit_encoding() : get_enc(ptr);
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index ca8f4b0..5f51ccc 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -140,7 +140,7 @@ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enable https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.h#L140
 
 #if VM_CHECK_MODE > 0
 #define SETUP_CANARY() \
-    VALUE *canary; \
+    VALUE *canary = 0; \
     if (leaf) { \
         canary = GET_SP(); \
         SET_SV(vm_stack_canary); \
-- 
cgit v0.10.2


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

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