* 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2015-07-02 05:48:14 +00:00
Родитель a499d1e698
Коммит 37c8a704bf
2 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Thu Jul 2 14:45:53 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* 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@ruby-lang.org> Thu Jul 2 14:15:50 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rubygems.rb (Gem.load_path_insert_index): search * lib/rubygems.rb (Gem.load_path_insert_index): search

14
st.c
Просмотреть файл

@ -282,7 +282,7 @@ st_init_strcasetable_with_size(st_index_t size)
void void
st_clear(st_table *table) st_clear(st_table *table)
{ {
register st_table_entry *ptr, *next; register st_table_entry *ptr = 0, *next;
if (table->entries_packed) { if (table->entries_packed) {
table->num_entries = 0; table->num_entries = 0;
@ -604,7 +604,7 @@ st_add_direct(st_table *table, st_data_t key, st_data_t value)
static void static void
rehash(register st_table *table) 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; st_index_t new_num_bins, hash_val;
new_num_bins = new_size(table->num_bins+1); new_num_bins = new_size(table->num_bins+1);
@ -623,7 +623,7 @@ st_table*
st_copy(st_table *old_table) st_copy(st_table *old_table)
{ {
st_table *new_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; st_index_t num_bins = old_table->num_bins;
new_table = st_alloc_table(); new_table = st_alloc_table();
@ -887,7 +887,7 @@ st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data
int int
st_foreach_check(st_table *table, int (*func)(ANYARGS), st_data_t arg, st_data_t never) 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; struct list_head *head;
enum st_retval retval; enum st_retval retval;
st_index_t i; st_index_t i;
@ -975,7 +975,7 @@ st_foreach_check(st_table *table, int (*func)(ANYARGS), st_data_t arg, st_data_t
int int
st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) 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; enum st_retval retval;
struct list_head *head; struct list_head *head;
st_index_t i; st_index_t i;
@ -1054,7 +1054,7 @@ get_keys(st_table *table, st_data_t *keys, st_index_t size, int check, st_data_t
} }
} }
else { else {
st_table_entry *ptr; st_table_entry *ptr = 0;
st_data_t *keys_end = keys + size; st_data_t *keys_end = keys + size;
list_for_each(st_head(table), ptr, olist) { list_for_each(st_head(table), ptr, olist) {
@ -1097,7 +1097,7 @@ get_values(st_table *table, st_data_t *values, st_index_t size, int check, st_da
} }
} }
else { else {
st_table_entry *ptr; st_table_entry *ptr = 0;
st_data_t *values_end = values + size; st_data_t *values_end = values + size;
list_for_each(st_head(table), ptr, olist) { list_for_each(st_head(table), ptr, olist) {