summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-10 22:51:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-01-10 22:52:40 +0900
commite66c6edabaa42391d79ae6ec78769b6f6e2746ec (patch)
tree4d0cae0a6f04a4649f118e96df37f5eb72195890
parent80a7655b10d3716b8ab8f02d4b843c4935c1c809 (diff)
downloadmruby-e66c6edabaa42391d79ae6ec78769b6f6e2746ec.tar.gz
mruby-e66c6edabaa42391d79ae6ec78769b6f6e2746ec.zip
Fix mixture of inline `int` declaration in `for` statement.
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 00a33021f..a2ac46d40 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -110,8 +110,6 @@ static void raise_error(codegen_scope *s, const char *msg);
static void
codegen_error(codegen_scope *s, const char *message)
{
- int i;
-
if (!s) return;
while (s->prev) {
codegen_scope *tmp = s->prev;
@@ -128,7 +126,7 @@ codegen_error(codegen_scope *s, const char *message)
mrb_free(s->mrb, s->catch_table);
if (s->reps) {
/* copied from mrb_irep_free() in state.c */
- for (i=0; i<s->irep->rlen; i++) {
+ for (int i=0; i<s->irep->rlen; i++) {
if (s->reps[i])
mrb_irep_decref(s->mrb, (mrb_irep*)s->reps[i]);
}