tests: Fix some clang -Wimplicit-fallthrough warnings.
authorBruno Haible <bruno@clisp.org>
Thu, 7 Sep 2023 14:13:22 +0000 (16:13 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 7 Sep 2023 14:24:45 +0000 (16:24 +0200)
* tests/test-execute-main.c (main): Add 'break' statement.
* tests/test-sys_file.c (main): Likewise.

ChangeLog
tests/test-execute-main.c
tests/test-sys_file.c

index b5f09d46cb8463e8a59176f6a933b0bb8b613bf5..0bfc465360d5b05209918d27ba2e11cd5a36a68f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-09-07  Bruno Haible  <bruno@clisp.org>
 
+       tests: Fix some clang -Wimplicit-fallthrough warnings.
+       * tests/test-execute-main.c (main): Add 'break' statement.
+       * tests/test-sys_file.c (main): Likewise.
+
        unictype/category-none: Fix clang -Wpedantic warning.
        * lib/unictype/categ_none.c (_UC_CATEGORY_NONE): Use ISO C designated
        initializer syntax to initialize the intended field of the union.
index cdbb5bd7612160b8d23b94ca8e1395e00365e320..afd6a749bdcaa5530494ba7592521ba4cb189283 100644 (file)
@@ -92,6 +92,7 @@ main (int argc, char *argv[])
           for (fd = 3; fd < 20; fd++)
             close (fd);
         }
+      break;
     default:
       break;
     }
index 347d6d2dd3424dcc82954089d51fd6baa2ada1bc..dae5fa2d79ee51c14e76478ea50423dec9fb97d8 100644 (file)
@@ -29,9 +29,9 @@ main (void)
     case LOCK_EX:
     case LOCK_NB:
     case LOCK_UN:
-      ;
+      break;
     default:
-      ;
+      break;
     }
   return 0;
 }