]> Savannah Git Hosting - gnulib.git/commitdiff
tests: pacify nvc 22.1 unreachable statement
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Jan 2022 03:33:21 +0000 (19:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Jan 2022 03:33:43 +0000 (19:33 -0800)
* tests/test-sys_wait.h (test_sys_wait_macros):
Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’.

ChangeLog
tests/test-sys_wait.h

index 5fb16542aa8c65767722bc61063876b6ba52ed83..911309912989d50f722ff7956add0708784aee20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2022-01-14  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index 50c7d5e8b179abba90f105bbbc0795c450b3943e..9becf28ebb4dfd29c426e60fe7ec1714f8dd736d 100644 (file)
@@ -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;
 }