Commit b071dcd4 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2873 from cremno/fix-coverity-missing-break-in-switch

Coverity: fix missing break in switch defects
parents ff49cf95 43df1d7e
...@@ -4802,6 +4802,7 @@ parser_yylex(parser_state *p) ...@@ -4802,6 +4802,7 @@ parser_yylex(parser_state *p)
case ')': case ')':
case ']': case ']':
p->paren_nest--; p->paren_nest--;
/* fall through */
case '}': case '}':
COND_LEXPOP(); COND_LEXPOP();
CMDARG_LEXPOP(); CMDARG_LEXPOP();
...@@ -5133,6 +5134,7 @@ parser_yylex(parser_state *p) ...@@ -5133,6 +5134,7 @@ parser_yylex(parser_state *p)
pushback(p, c); pushback(p, c);
return '$'; return '$';
} }
/* fall through */
case '0': case '0':
tokadd(p, '$'); tokadd(p, '$');
} }
......
...@@ -259,6 +259,7 @@ mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx) ...@@ -259,6 +259,7 @@ mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx)
switch (mrb_type(indx)) { switch (mrb_type(indx)) {
case MRB_TT_FLOAT: case MRB_TT_FLOAT:
indx = mrb_flo_to_fixnum(mrb, indx); indx = mrb_flo_to_fixnum(mrb, indx);
/* fall through */
case MRB_TT_FIXNUM: case MRB_TT_FIXNUM:
idx = mrb_fixnum(indx); idx = mrb_fixnum(indx);
......
...@@ -819,7 +819,6 @@ write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t *bin, uint8 ...@@ -819,7 +819,6 @@ write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t *bin, uint8
uint32_t offset; uint32_t offset;
switch (flags & DUMP_ENDIAN_NAT) { switch (flags & DUMP_ENDIAN_NAT) {
default:
endian_big: endian_big:
case DUMP_ENDIAN_BIG: case DUMP_ENDIAN_BIG:
memcpy(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident)); memcpy(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident));
......
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