bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] spawn-tests, sys_socket-tests, sys_wait-tests: port to clang


From: Paul Eggert
Subject: [PATCH 4/4] spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
Date: Wed, 15 May 2013 20:54:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

 ChangeLog               | 6 ++++++
 tests/test-spawn.c      | 2 +-
 tests/test-sys_socket.c | 2 +-
 tests/test-sys_wait.c   | 6 +++---
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f9212fe..171fa5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-05-15  Paul Eggert  <address@hidden>
 
+       spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
+       * tests/test-spawn.c (main):
+       * tests/test-sys_socket.c (main):
+       * tests/test-sys_wait.c (main):
+       Don't have a switch value that isn't covered by a case.
+
        getaddrinfo-tests: port --enable-gcc-warnings to clang
        * tests/test-getaddrinfo.c (simple):
        Avoid casts from looser to stricter-aligned pointers.
diff --git a/tests/test-spawn.c b/tests/test-spawn.c
index cfa9dc6..5b68171 100644
--- a/tests/test-spawn.c
+++ b/tests/test-spawn.c
@@ -40,7 +40,7 @@ extern void f (struct sched_param *g);
 int
 main (void)
 {
-  switch (0)
+  switch (POSIX_SPAWN_RESETIDS)
     {
     case POSIX_SPAWN_RESETIDS:
     case POSIX_SPAWN_SETPGROUP:
diff --git a/tests/test-sys_socket.c b/tests/test-sys_socket.c
index 0ac8a33..9084b18 100644
--- a/tests/test-sys_socket.c
+++ b/tests/test-sys_socket.c
@@ -47,7 +47,7 @@ main (void)
   sa_family_t i;
 
   /* Check some errno values.  */
-  switch (0)
+  switch (ENOTSOCK)
     {
     case ENOTSOCK:
     case EADDRINUSE:
diff --git a/tests/test-sys_wait.c b/tests/test-sys_wait.c
index 4dd2130..7753da3 100644
--- a/tests/test-sys_wait.c
+++ b/tests/test-sys_wait.c
@@ -31,17 +31,17 @@ main (void)
   if (test_sys_wait_macros ())
     return 1;
 
-  switch (0)
-    {
 #if 0
+  switch (WCONTINUED)
+    {
   /* Gnulib doesn't guarantee these, yet.  */
     case WCONTINUED:
     case WEXITED:
     case WNOWAIT:
     case WSTOPPED:
-#endif
       break;
     }
+#endif
 
   return a ? 1 : 0;
 }
-- 
1.7.11.7





reply via email to

[Prev in Thread] Current Thread [Next in Thread]