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

ruby-changes:58820

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Mon, 18 Nov 2019 18:28:28 +0900 (JST)
Subject: [ruby-changes:58820] 7a9b2039b7 (master): delete unused codes

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

From 7a9b2039b7b82f081f2cab40a4fbbc8b01231ca4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Mon, 18 Nov 2019 12:00:19 +0900
Subject: delete unused codes

Suppress compiler warnings.

diff --git a/process.c b/process.c
index 69d362b..a7fa220 100644
--- a/process.c
+++ b/process.c
@@ -2338,7 +2338,6 @@ rb_check_argv(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L2338
 {
     VALUE tmp, prog;
     int i;
-    const char *name = 0;
 
     rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
 
@@ -2353,7 +2352,6 @@ rb_check_argv(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L2352
 	SafeStringValue(prog);
 	StringValueCStr(prog);
 	prog = rb_str_new_frozen(prog);
-	name = RSTRING_PTR(prog);
     }
     for (i = 0; i < argc; i++) {
 	SafeStringValue(argv[i]);
diff --git a/ruby.c b/ruby.c
index 1f0bf88..6edc5c4 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1217,12 +1217,9 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) https://github.com/ruby/ruby/blob/trunk/ruby.c#L1217
 	  case 'T':
             {
                 size_t numlen;
-                int v = 1;
 
                 if (*++s) {
-                    v = scan_oct(s, 2, &numlen);
-                    if (numlen == 0)
-                        v = 1;
+                    scan_oct(s, 2, &numlen);
                     s += numlen;
                 }
             }
diff --git a/string.c b/string.c
index 00da7e2..e58be68 100644
--- a/string.c
+++ b/string.c
@@ -4937,10 +4937,8 @@ rb_pat_search(VALUE pat, VALUE str, long pos, int set_backref_str) https://github.com/ruby/ruby/blob/trunk/string.c#L4937
 	pos = rb_strseq_index(str, pat, pos, 1);
 	if (set_backref_str) {
 	    if (pos >= 0) {
-		VALUE match;
 		str = rb_str_new_frozen(str);
 		rb_backref_set_string(str, pos, RSTRING_LEN(pat));
-		match = rb_backref_get();
 	    }
 	    else {
 		rb_backref_set(Qnil);
-- 
cgit v0.10.2


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

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