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

Coverity: fix missing break in switch defects
This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-07-03 15:03:01 +09:00
3 changed files with 3 additions and 1 deletions
+2
View File
@@ -4802,6 +4802,7 @@ parser_yylex(parser_state *p)
case ')':
case ']':
p->paren_nest--;
/* fall through */
case '}':
COND_LEXPOP();
CMDARG_LEXPOP();
@@ -5133,6 +5134,7 @@ parser_yylex(parser_state *p)
pushback(p, c);
return '$';
}
/* fall through */
case '0':
tokadd(p, '$');
}
+1
View File
@@ -259,6 +259,7 @@ mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx)
switch (mrb_type(indx)) {
case MRB_TT_FLOAT:
indx = mrb_flo_to_fixnum(mrb, indx);
/* fall through */
case MRB_TT_FIXNUM:
idx = mrb_fixnum(indx);
-1
View File
@@ -819,7 +819,6 @@ write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t *bin, uint8
uint32_t offset;
switch (flags & DUMP_ENDIAN_NAT) {
default:
endian_big:
case DUMP_ENDIAN_BIG:
memcpy(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident));