vm.c: suppress 64-to-32 warnings

* vm.c (backtrace_object): suppress 64-to-32 warnings.  should adjust
  types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-05-24 09:51:20 +00:00
parent d5893b91fa
commit 04a03b34c3
2 changed files with 8 additions and 8 deletions

4
vm.c
View File

@ -897,7 +897,7 @@ backtrace_object(rb_thread_t *th, int lev, int n)
start_cfp = RUBY_VM_NEXT_CONTROL_FRAME(
RUBY_VM_NEXT_CONTROL_FRAME(
RUBY_VM_NEXT_CONTROL_FRAME(start_cfp))); /* skip top frames */
size = (start_cfp - last_cfp) + 1;
size = (int)(start_cfp - last_cfp) + 1; /* TODO: check overflow */
if (n <= 0) {
n = size + n;
@ -1024,7 +1024,7 @@ vm_backtrace_each(rb_thread_t *th, int lev, int n, void (*init)(void *), rb_back
int line_no = 0;
if (n <= 0) {
n = cfp - limit_cfp;
n = (int)(cfp - limit_cfp); /* TODO: check overflow */
}
cfp -= 2;