Some clang -Wimplicit-fallthrough warnings are easy to fix: test-execute-main.c:95:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] test-sys_file.c:33:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
2023-09-07 Bruno Haible <[email protected]> tests: Fix some clang -Wimplicit-fallthrough warnings. * tests/test-execute-main.c (main): Add 'break' statement. * tests/test-sys_file.c (main): Likewise. diff --git a/tests/test-execute-main.c b/tests/test-execute-main.c index cdbb5bd761..afd6a749bd 100644 --- a/tests/test-execute-main.c +++ b/tests/test-execute-main.c @@ -92,6 +92,7 @@ main (int argc, char *argv[]) for (fd = 3; fd < 20; fd++) close (fd); } + break; default: break; } diff --git a/tests/test-sys_file.c b/tests/test-sys_file.c index 347d6d2dd3..dae5fa2d79 100644 --- a/tests/test-sys_file.c +++ b/tests/test-sys_file.c @@ -29,9 +29,9 @@ main (void) case LOCK_EX: case LOCK_NB: case LOCK_UN: - ; + break; default: - ; + break; } return 0; }
