[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: pacify nvc 22.1 unreachable statement
From: |
Paul Eggert |
Subject: |
[PATCH] tests: pacify nvc 22.1 unreachable statement |
Date: |
Fri, 14 Jan 2022 19:34:12 -0800 |
* 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 <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.
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.32.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: pacify nvc 22.1 unreachable statement,
Paul Eggert <=