summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-02 05:48:14 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-02 05:48:14 +0000
commit37c8a704bf839b17f3fb7a7e8eca3ea5ada695bf (patch)
treea0f39530aff49ac225b36e40652d61e2edc5e674 /st.c
parenta499d1e69865ec17fee0e9bcaf493ac1d4d559ae (diff)
downloadruby-37c8a704bf839b17f3fb7a7e8eca3ea5ada695bf.tar.gz
* 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
Diffstat (limited to 'st.c')
-rw-r--r--st.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/st.c b/st.c
index 887b9dce4d..e675ee74cb 100644
--- a/st.c
+++ b/st.c
@@ -282,7 +282,7 @@ st_init_strcasetable_with_size(st_index_t size)
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 key, st_data_t value)
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*
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, st_update_callback_func *func, st_data
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 (*func)(ANYARGS), st_data_t arg, st_data_t
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 *keys, st_index_t size, int check, st_data_t
}
}
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 *values, st_index_t size, int check, st_da
}
}
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) {