Fix compilation on gcc 4.9.x
MODIFY
mrbgems/mruby-test/driver.c
mrbgems/mruby-test/driver.c
@@ -50,10 +50,10 @@ static mrb_value
t_print(mrb_state *mrb, mrb_value self)
{
mrb_value *argv;
- mrb_int argc;
+ mrb_int argc, i;
mrb_get_args(mrb, "*!", &argv, &argc);
- for (mrb_int i = 0; i < argc; ++i) {
+ for (i = 0; i < argc; ++i) {
mrb_value s = mrb_obj_as_string(mrb, argv[i]);
fwrite(RSTRING_PTR(s), RSTRING_LEN(s), 1, stdout);
}

MODIFY
src/numeric.c
src/numeric.c
@@ -212,7 +212,8 @@ flo_to_s(mrb_state *mrb, mrb_value flt)
insert_dot_zero:
begp = RSTRING_PTR(str);
len = RSTRING_LEN(str);
- for (char *p = begp, *endp = p + len; p < endp; ++p) {
+ char *p, *endp;
+ for (p = begp, endp = p + len; p < endp; ++p) {
if (*p == '.') {
return str;
}

MODIFY
src/variable.c
src/variable.c
@@ -1115,7 +1115,8 @@ mrb_class_find_path(mrb_state *mrb, struct RClass *c)
mrb_bool
mrb_ident_p(const char *s, mrb_int len)
{
- for (mrb_int i = 0; i < len; i++) {
+ mrb_int i;
+ for (i = 0; i < len; i++) {
if (!identchar(s[i])) return FALSE;
}
return TRUE;

Fix compilation on gcc 4.9.x