]> Savannah Git Hosting - gnulib.git/commitdiff
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, 14 Sep 2023 10:15:55 +0000 (12:15 +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 6dfac48a14d5efb3e3b8ccbde529adfe4f17c570..9136b8e04f6720267c1404953950f9e29e0596f3 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 cb799cf8837d590d12845cd562790e00590eae3a..84848793fde1f19bd74aca0eb14cd5810d5f4aca 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;
 }