From 261712b93effaccb148f68f2002cfb94540efc78 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 14 Jan 2022 19:33:21 -0800 Subject: [PATCH] tests: pacify nvc 22.1 unreachable statement MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * tests/test-sys_wait.h (test_sys_wait_macros): Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’. --- ChangeLog | 4 ++++ tests/test-sys_wait.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fb16542aa..9113099129 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2022-01-14 Paul Eggert + tests: pacify nvc 22.1 unreachable statement + * tests/test-sys_wait.h (test_sys_wait_macros): + Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’. + tests: pacify nvc 22.1 set-but-not-used * tests/test-fnmatch.c (main): Don’t set a var without using it. * tests/test-sched.c (f1): Now extern. diff --git a/tests/test-sys_wait.h b/tests/test-sys_wait.h index 50c7d5e8b1..9becf28ebb 100644 --- a/tests/test-sys_wait.h +++ b/tests/test-sys_wait.h @@ -40,14 +40,14 @@ test_sys_wait_macros (void) } i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i); +#if 0 switch (i) { -#if 0 /* Gnulib doesn't guarantee these, yet. */ case WNOHANG: case WUNTRACED: -#endif break; } +#endif return 0; } -- 2.39.5