From 002ad12d27aeb04dee8f8caa647b1aa3a8c175a9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 7 Sep 2023 16:13:22 +0200 Subject: [PATCH] tests: Fix some clang -Wimplicit-fallthrough warnings. * tests/test-execute-main.c (main): Add 'break' statement. * tests/test-sys_file.c (main): Likewise. --- ChangeLog | 4 ++++ tests/test-execute-main.c | 1 + tests/test-sys_file.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34a5be87ab..f2e332fcf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2023-09-07 Bruno Haible + 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. 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; } -- 2.39.5