diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-17 02:11:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-17 02:11:21 +0000 |
commit | ea268a46dc451161e4f97eb325276a180d2ff3e8 (patch) | |
tree | 6be838426dfc3fcbfbbd749702a0686c3e21f4f1 /vm_dump.c | |
parent | 4b56a4c67f13ebdeac04794dce8ba36d96342dd6 (diff) | |
download | ruby-ea268a46dc451161e4f97eb325276a180d2ff3e8.tar.gz ruby-ea268a46dc451161e4f97eb325276a180d2ff3e8.tar.xz ruby-ea268a46dc451161e4f97eb325276a180d2ff3e8.zip |
* vm_dump.c (vm_stack_dump_each): initialized at declarations.
* vm_dump.c (rb_vm_bugreport): constified to suppress a warning.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r-- | vm_dump.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -246,24 +246,19 @@ vm_stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp) VALUE *lfp = cfp->lfp; VALUE *dfp = cfp->dfp; - int argc = 0, local_size; + int argc = 0, local_size = 0; const char *name; rb_iseq_t *iseq = cfp->iseq; if (iseq == 0) { if (RUBYVM_CFUNC_FRAME_P(cfp)) { - argc = 0; - local_size = 0; name = rb_id2name(cfp->method_id); } else { name = "?"; - local_size = 0; } } else if (RUBY_VM_IFUNC_P(iseq)) { - argc = 0; - local_size = 0; name = "<ifunc>"; } else { @@ -605,7 +600,7 @@ rb_vm_bugreport(void) fprintf(stderr, "-- C level backtrace information " "-------------------------------------------\n"); for (i=0; i<n; i++) { - char *info = syms ? syms[i] : ""; + const char *info = syms ? syms[i] : ""; fprintf(stderr, "%p %s\n", trace[i], info); } fprintf(stderr, "\n"); |