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

ruby-changes:56502

From: Yusuke <ko1@a...>
Date: Sun, 14 Jul 2019 23:03:35 +0900 (JST)
Subject: [ruby-changes:56502] Yusuke Endoh: 0bf829c17b (master): transcode.c (rb_trans_conv): remove unnecessary assignments

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

From 0bf829c17b92c608bc374f03a63b89a940d61955 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sun, 14 Jul 2019 23:02:23 +0900
Subject: transcode.c (rb_trans_conv): remove unnecessary assignments

This change will suppress Coverity Scan warnings

diff --git a/transcode.c b/transcode.c
index 5f9e4e9..0f72a2d 100644
--- a/transcode.c
+++ b/transcode.c
@@ -1194,7 +1194,6 @@ rb_trans_conv(rb_econv_t *ec, https://github.com/ruby/ruby/blob/trunk/transcode.c#L1194
     if (ec->elems[0].last_result == econv_after_output)
         ec->elems[0].last_result = econv_source_buffer_empty;
 
-    needreport_index = -1;
     for (i = ec->num_trans-1; 0 <= i; i--) {
         switch (ec->elems[i].last_result) {
           case econv_invalid_byte_sequence:
@@ -1203,7 +1202,6 @@ rb_trans_conv(rb_econv_t *ec, https://github.com/ruby/ruby/blob/trunk/transcode.c#L1202
           case econv_after_output:
           case econv_finished:
             sweep_start = i+1;
-            needreport_index = i;
             goto found_needreport;
 
           case econv_destination_buffer_full:
-- 
cgit v0.10.2


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

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