summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-24 09:51:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-24 09:51:20 +0000
commit04a03b34c3b5320c23d9e78f4acc884370e01bb1 (patch)
treef911d34221d6da463259579c24ef15d19318eff6 /vm.c
parentd5893b91faa7dc77ca6c9728d1054dabd757aead (diff)
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
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 0898deac92..93e5f2a01a 100644
--- a/vm.c
+++ b/vm.c
@@ -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;