From 2a20a5ee92fe2ffc893efaa7f759506421943514 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 24 Jul 2015 21:44:14 +0000 Subject: * vm_core.h: size should be unsigned. * rb_call_info_t::index * rb_iseq_constant_body::stack_max * rb_iseq_constant_body::local_size * rb_iseq_constant_body::param::size * rb_iseq_constant_body::local_table_size * rb_iseq_constant_body::is_size * rb_iseq_constant_body::callinfo_size * iseq.h: same for iseq_catch_table::size. * compile.c: catch up these fix. * iseq.c: ditto. * proc.c: ditto. * vm.c: ditto. * vm_args.c: ditto. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 357ed4daa4..c2256471bd 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -713,7 +713,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr) const VALUE *const ptr = ROBJECT_IVPTR(obj); if (LIKELY(is_attr ? ci->aux.index > 0 : ic->ic_serial == RCLASS_SERIAL(klass))) { - int index = !is_attr ? (int)ic->ic_value.index : ci->aux.index - 1; + long index = !is_attr ? (long)ic->ic_value.index : (long)(ci->aux.index - 1); if (index < len) { val = ptr[index]; @@ -1383,7 +1383,7 @@ vm_call_iseq_setup_normal(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info static inline VALUE vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci) { - int i; + unsigned int i; VALUE *argv = cfp->sp - ci->argc; const rb_callable_method_entry_t *me = ci->me; const rb_iseq_t *iseq = def_iseq_ptr(me->def); -- cgit v1.2.3