spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 May 2013 22:59:01 +0000 (15:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 May 2013 03:51:00 +0000 (20:51 -0700)
* 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.

ChangeLog
tests/test-spawn.c
tests/test-sys_socket.c
tests/test-sys_wait.c

index f9212fe..171fa5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-05-15  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index cfa9dc6..5b68171 100644 (file)
@@ -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:
index 0ac8a33..9084b18 100644 (file)
@@ -47,7 +47,7 @@ main (void)
   sa_family_t i;
 
   /* Check some errno values.  */
-  switch (0)
+  switch (ENOTSOCK)
     {
     case ENOTSOCK:
     case EADDRINUSE:
index 4dd2130..7753da3 100644 (file)
@@ -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;
 }