summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authordearblue <[email protected]>2020-07-26 11:49:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:34 +0900
commit6bc5857125029aa519371b10625f7384767d7138 (patch)
tree87400c651f05a68e8fb4aa56dba85735577e35ed /src
parentbfb7b491cc13776cc4b44671d1605f8fb1da7514 (diff)
downloadmruby-6bc5857125029aa519371b10625f7384767d7138.tar.gz
mruby-6bc5857125029aa519371b10625f7384767d7138.zip
Suppress warnings for C++
Variables in jump destination block separate declaration and assignment.
Diffstat (limited to 'src')
-rw-r--r--src/vm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vm.c b/src/vm.c
index 42280f0a1..9b501808b 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2018,7 +2018,8 @@ RETRY_TRY_BLOCK:
case OP_R_RETURN:
/* Fall through to OP_R_NORMAL otherwise */
if (ci->acc >=0 && MRB_PROC_ENV_P(proc) && !MRB_PROC_STRICT_P(proc)) {
- mrb_callinfo *cibase = mrb->c->cibase;
+ mrb_callinfo *cibase;
+ cibase = mrb->c->cibase;
dst = top_proc(mrb, proc);
if (MRB_PROC_ENV_P(dst)) {
@@ -2057,7 +2058,8 @@ RETRY_TRY_BLOCK:
case OP_R_NORMAL:
NORMAL_RETURN:
if (ci == mrb->c->cibase) {
- struct mrb_context *c = mrb->c;
+ struct mrb_context *c;
+ c = mrb->c;
if (!c->prev) { /* toplevel return */
regs[irep->nlocals] = v;