Fix warnings about fall-through in switches
authorSteve McIntyre <steve@einval.com>
Sun, 27 Oct 2019 18:31:51 +0000 (18:31 +0000)
committerSteve McIntyre <steve@einval.com>
Sun, 27 Oct 2019 18:31:51 +0000 (18:31 +0000)
src/jigdo-file.cc
src/zstream-gz.cc

index 038aaaa..96968e6 100644 (file)
@@ -418,11 +418,14 @@ size_t scanMemSize(const char* str) {
   switch (*s) { // Fallthrough mania!
   case 'g': case 'G':
     x = x * 1024;
+    // fall through
   case 'm': case 'M':
     x = x * 1024;
+    // fall through
   case 'k': case 'K':
     x = x * 1024;
     if (*++s == '\0') return x;
+    // fall through
   default:
     cerr << subst(_("%1: Invalid size specifier `%2'"), binName(), str)
          << endl;
index e403366..d336176 100644 (file)
@@ -49,12 +49,16 @@ namespace {
       // NB: fallthrough:
     case Z_STREAM_ERROR:
       if (m.empty()) m = "zlib Z_STREAM_ERROR";
+      // fallthrough
     case Z_DATA_ERROR:
       if (m.empty()) m = "zlib Z_DATA_ERROR";
+      // fallthrough
     case Z_BUF_ERROR:
       if (m.empty()) m = "zlib Z_BUF_ERROR";
+      // fallthrough
     case Z_VERSION_ERROR:
       if (m.empty()) m = "zlib Z_VERSION_ERROR";
+      // fallthrough
     default:
       throw Zerror(status, m);
     }