From 72072e6343bf0f12b4f6ca5a4f953b46fe2db709 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 13 Aug 2009 07:31:23 +0000 Subject: [PATCH] * insns.def (opt_case_dispatch): suppressed a warning. * vm_insnhelper.c (opt_case_dispatch_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ insns.def | 2 +- vm_insnhelper.c | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 136dd684cb..3e196edd47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Aug 13 16:31:10 2009 Nobuyoshi Nakada + + * insns.def (opt_case_dispatch): suppressed a warning. + + * vm_insnhelper.c (opt_case_dispatch_i): ditto. + Thu Aug 13 16:20:07 2009 Nobuyoshi Nakada * configure.in, Makefile.in (MAKEDIRS): used MKDIR_P instead of diff --git a/insns.def b/insns.def index dfae799b30..1c2e9d5752 100644 --- a/insns.def +++ b/insns.def @@ -1247,7 +1247,7 @@ opt_case_dispatch key, -1 }; - st_foreach(RHASH_TBL(hash), opt_case_dispatch_i, &arg); + st_foreach(RHASH_TBL(hash), opt_case_dispatch_i, (st_data_t)&arg); if (arg.label != -1) { JUMP(arg.label); diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 07aa24468b..24f4e0133d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1599,8 +1599,10 @@ struct opt_case_dispatch_i_arg { }; static int -opt_case_dispatch_i(st_data_t key, st_data_t data, struct opt_case_dispatch_i_arg *arg) +opt_case_dispatch_i(st_data_t key, st_data_t data, void *p) { + struct opt_case_dispatch_i_arg *arg = p; + if (RTEST(rb_funcall((VALUE)key, idEqq, 1, arg->obj))) { arg->label = FIX2INT((VALUE)data); return ST_STOP;