diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-29 15:45:25 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-29 15:45:25 +0000 |
commit | 6c42f57177e7cb6c8025e3c482df5ba7359c4f4e (patch) | |
tree | 94c0f01cbea4849ba0f29db9c4153e0b91877a10 /thread.c | |
parent | ce0c2b2170f4fd562b1019e325638649def9d924 (diff) | |
download | ruby-6c42f57177e7cb6c8025e3c482df5ba7359c4f4e.tar.gz |
* vm_trace.c, vm.c, thread.c: get rid of (maybe false positive) warnings about
using uninitialized var with VC++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -371,7 +371,7 @@ rb_threadptr_trap_interrupt(rb_thread_t *th) static void terminate_all(rb_vm_t *vm, const rb_thread_t *main_thread) { - rb_thread_t *th; + rb_thread_t *th = 0; list_for_each(&vm->living_threads, th, vmlt_node) { if (th != main_thread) { @@ -2070,7 +2070,7 @@ void rb_thread_fd_close(int fd) { rb_vm_t *vm = GET_THREAD()->vm; - rb_thread_t *th; + rb_thread_t *th = 0; list_for_each(&vm->living_threads, th, vmlt_node) { if (th->waiting_fd == fd) { @@ -2324,7 +2324,7 @@ rb_thread_list(void) { VALUE ary = rb_ary_new(); rb_vm_t *vm = GET_THREAD()->vm; - rb_thread_t *th; + rb_thread_t *th = 0; list_for_each(&vm->living_threads, th, vmlt_node) { switch (th->status) { @@ -3882,7 +3882,7 @@ thgroup_list(VALUE group) { VALUE ary = rb_ary_new(); rb_vm_t *vm = GET_THREAD()->vm; - rb_thread_t *th; + rb_thread_t *th = 0; list_for_each(&vm->living_threads, th, vmlt_node) { if (th->thgroup == group) { @@ -5030,7 +5030,7 @@ static void debug_deadlock_check(rb_vm_t *vm) { #ifdef DEBUG_DEADLOCK_CHECK - rb_thread_t *th; + rb_thread_t *th = 0; printf("%d %d %p %p\n", vm_living_thread_num(vm), vm->sleeper, GET_THREAD(), vm->main_thread); list_for_each(&vm->living_threads, th, vmlt_node) { @@ -5053,7 +5053,7 @@ static void rb_check_deadlock(rb_vm_t *vm) { int found = 0; - rb_thread_t *th; + rb_thread_t *th = 0; if (vm_living_thread_num(vm) > vm->sleeper) return; if (vm_living_thread_num(vm) < vm->sleeper) rb_bug("sleeper must not be more than vm_living_thread_num(vm)"); |