Commit 60df7778 authored by kano4's avatar kano4

Add break to default case in switch statement

parent 08a0c9f3
......@@ -702,6 +702,7 @@ mrb_ary_aget(mrb_state *mrb, mrb_value self)
default:
mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
break;
}
return mrb_nil_value(); /* dummy to avoid warning : not reach here */
......
......@@ -408,6 +408,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
if (argc <= i && !opt) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
}
break;
}
switch (c) {
......
......@@ -379,6 +379,7 @@ dispatch(codegen_scope *s, int pc)
fprintf(stderr, "bug: dispatch on non JMP op\n");
#endif
scope_error(s);
break;
}
s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff);
}
......
......@@ -518,6 +518,7 @@ mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
default:
cv = mrb_singleton_class(mrb, self);
c = mrb_class_ptr(cv);
break;
}
return mrb_yield_internal(mrb, b, 0, 0, self, c);
}
......@@ -931,6 +932,7 @@ mrb_f_raise(mrb_state *mrb, mrb_value self)
exc = mrb_make_exception(mrb, argc, a);
mrb_obj_iv_set(mrb, mrb_obj_ptr(exc), mrb_intern(mrb, "lastpc"), mrb_voidp_value(mrb->ci->pc));
mrb_exc_raise(mrb, exc);
break;
}
return mrb_nil_value(); /* not reached */
}
......
......@@ -240,6 +240,7 @@ is_special_global_name(const char* m)
default:
if (!ISDIGIT(*m)) return FALSE;
do ++m; while (ISDIGIT(*m));
break;
}
return !*m;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment