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

ruby-changes:60211

From: Yusuke <ko1@a...>
Date: Thu, 27 Feb 2020 09:50:58 +0900 (JST)
Subject: [ruby-changes:60211] 1d81baf3c1 (master): st.c: remove variables that are no longer used

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

From 1d81baf3c1507cbe5e75b08a833761122e68444b Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Thu, 27 Feb 2020 09:49:24 +0900
Subject: st.c: remove variables that are no longer used

to suppress a warning "variable 'check' set but not used"

diff --git a/st.c b/st.c
index 8202b4f..f0ef65d 100644
--- a/st.c
+++ b/st.c
@@ -1162,7 +1162,7 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, https://github.com/ruby/ruby/blob/trunk/st.c#L1162
 {
     st_table_entry *entry;
     st_index_t bin;
-    st_index_t ind, check;
+    st_index_t ind;
     st_hash_t hash_value;
     st_index_t bin_ind;
     int new_p;
@@ -1188,7 +1188,6 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, https://github.com/ruby/ruby/blob/trunk/st.c#L1188
 	bin -= ENTRY_BASE;
     }
     if (new_p) {
-        check = tab->rebuilds_num;
         key = (*func)(key);
         ind = tab->entries_bound++;
         entry = &tab->entries[ind];
@@ -1389,7 +1388,6 @@ st_update(st_table *tab, st_data_t key, https://github.com/ruby/ruby/blob/trunk/st.c#L1388
     st_table_entry *entries;
     st_index_t bin_ind;
     st_data_t value = 0, old_key;
-    st_index_t check;
     int retval, existing;
     st_hash_t hash = do_hash(key, tab);
 
@@ -1418,7 +1416,6 @@ st_update(st_table *tab, st_data_t key, https://github.com/ruby/ruby/blob/trunk/st.c#L1416
         value = entry->record;
     }
     old_key = key;
-    check = tab->rebuilds_num;
     retval = (*func)(&key, &value, arg, existing);
     switch (retval) {
       case ST_CONTINUE:
-- 
cgit v0.10.2


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

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