ruby-changes:39024
From: usa <ko1@a...>
Date: Thu, 2 Jul 2015 14:48:29 +0900 (JST)
Subject: [ruby-changes:39024] usa:r51105 (trunk): * st.c: get rid of VC++'s warnings of C4700 (uninitialized local
usa 2015-07-02 14:48:14 +0900 (Thu, 02 Jul 2015) New Revision: 51105 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51105 Log: * st.c: get rid of VC++'s warnings of C4700 (uninitialized local variable used). I think that these are wrong, but should shut them up. Modified files: trunk/ChangeLog trunk/st.c Index: ChangeLog =================================================================== --- ChangeLog (revision 51104) +++ ChangeLog (revision 51105) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jul 2 14:45:53 2015 NAKAMURA Usaku <usa@r...> + + * st.c: get rid of VC++'s warnings of C4700 (uninitialized local + variable used). I think that these are wrong, but should shut them + up. + Thu Jul 2 14:15:50 2015 Nobuyoshi Nakada <nobu@r...> * lib/rubygems.rb (Gem.load_path_insert_index): search Index: st.c =================================================================== --- st.c (revision 51104) +++ st.c (revision 51105) @@ -282,7 +282,7 @@ st_init_strcasetable_with_size(st_index_ https://github.com/ruby/ruby/blob/trunk/st.c#L282 void st_clear(st_table *table) { - register st_table_entry *ptr, *next; + register st_table_entry *ptr = 0, *next; if (table->entries_packed) { table->num_entries = 0; @@ -604,7 +604,7 @@ st_add_direct(st_table *table, st_data_t https://github.com/ruby/ruby/blob/trunk/st.c#L604 static void rehash(register st_table *table) { - register st_table_entry *ptr, **new_bins; + register st_table_entry *ptr = 0, **new_bins; st_index_t new_num_bins, hash_val; new_num_bins = new_size(table->num_bins+1); @@ -623,7 +623,7 @@ st_table* https://github.com/ruby/ruby/blob/trunk/st.c#L623 st_copy(st_table *old_table) { st_table *new_table; - st_table_entry *ptr, *entry; + st_table_entry *ptr = 0, *entry; st_index_t num_bins = old_table->num_bins; new_table = st_alloc_table(); @@ -887,7 +887,7 @@ st_update(st_table *table, st_data_t key https://github.com/ruby/ruby/blob/trunk/st.c#L887 int st_foreach_check(st_table *table, int (*func)(ANYARGS), st_data_t arg, st_data_t never) { - st_table_entry *ptr, **last, *tmp, *next; + st_table_entry *ptr = 0, **last, *tmp, *next; struct list_head *head; enum st_retval retval; st_index_t i; @@ -975,7 +975,7 @@ st_foreach_check(st_table *table, int (* https://github.com/ruby/ruby/blob/trunk/st.c#L975 int st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) { - st_table_entry *ptr, **last, *tmp, *next; + st_table_entry *ptr = 0, **last, *tmp, *next; enum st_retval retval; struct list_head *head; st_index_t i; @@ -1054,7 +1054,7 @@ get_keys(st_table *table, st_data_t *key https://github.com/ruby/ruby/blob/trunk/st.c#L1054 } } else { - st_table_entry *ptr; + st_table_entry *ptr = 0; st_data_t *keys_end = keys + size; list_for_each(st_head(table), ptr, olist) { @@ -1097,7 +1097,7 @@ get_values(st_table *table, st_data_t *v https://github.com/ruby/ruby/blob/trunk/st.c#L1097 } } else { - st_table_entry *ptr; + st_table_entry *ptr = 0; st_data_t *values_end = values + size; list_for_each(st_head(table), ptr, olist) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/