From 7a3cfdb0132b47b4d14c8418c26b11782dc2dd83 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 21 Dec 2016 13:05:06 +1300 Subject: [PATCH] Fix GCC 7 warnings From -Wimplicit-fallthrough which is now enabled by -W. --- Source/Modules/pike.cxx | 7 +++---- Source/Modules/ruby.cxx | 3 +-- Source/Preprocessor/cpp.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Modules/pike.cxx b/Source/Modules/pike.cxx index 6a74851c8..b8ed4037a 100644 --- a/Source/Modules/pike.cxx +++ b/Source/Modules/pike.cxx @@ -261,10 +261,9 @@ public: rename = strip(name); Printf(f_classInit, "ADD_FUNCTION(\"%s\", %s, tFunc(%s), 0);\n", rename, function, description); break; - case CLASS_CONST: - assert(false); // shouldn't have gotten here for CLASS_CONST nodes - default: - assert(false); // what is this? + case CLASS_CONST: // shouldn't have gotten here for CLASS_CONST nodes + default: // what is this? + assert(false); } Delete(rename); } diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 1846ed263..b9ac11546 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -1419,9 +1419,8 @@ public: case DESTRUCTOR: case CLASS_CONST: case STATIC_VAR: - assert(false); // Should not have gotten here for these types default: - assert(false); + assert(false); // Should not have gotten here for these types } defineAliases(n, iname); diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c index a183eecde..12d27c316 100644 --- a/Source/Preprocessor/cpp.c +++ b/Source/Preprocessor/cpp.c @@ -1459,7 +1459,7 @@ String *Preprocessor_parse(String *s) { break; } state = 43; - /* no break intended here */ + /* FALL THRU */ case 43: /* Get preprocessor value */