Fix GCC 7 warnings

From -Wimplicit-fallthrough which is now enabled by -W.
This commit is contained in:
Olly Betts 2016-12-21 13:05:06 +13:00
commit 7a3cfdb013
3 changed files with 5 additions and 7 deletions

View file

@ -261,10 +261,9 @@ public:
rename = strip(name); rename = strip(name);
Printf(f_classInit, "ADD_FUNCTION(\"%s\", %s, tFunc(%s), 0);\n", rename, function, description); Printf(f_classInit, "ADD_FUNCTION(\"%s\", %s, tFunc(%s), 0);\n", rename, function, description);
break; break;
case CLASS_CONST: case CLASS_CONST: // shouldn't have gotten here for CLASS_CONST nodes
assert(false); // shouldn't have gotten here for CLASS_CONST nodes default: // what is this?
default: assert(false);
assert(false); // what is this?
} }
Delete(rename); Delete(rename);
} }

View file

@ -1419,9 +1419,8 @@ public:
case DESTRUCTOR: case DESTRUCTOR:
case CLASS_CONST: case CLASS_CONST:
case STATIC_VAR: case STATIC_VAR:
assert(false); // Should not have gotten here for these types
default: default:
assert(false); assert(false); // Should not have gotten here for these types
} }
defineAliases(n, iname); defineAliases(n, iname);

View file

@ -1459,7 +1459,7 @@ String *Preprocessor_parse(String *s) {
break; break;
} }
state = 43; state = 43;
/* no break intended here */ /* FALL THRU */
case 43: case 43:
/* Get preprocessor value */ /* Get preprocessor value */