Mercurial > hg > octave-lyh > gnulib-hg
changeset 17412:6054142aae93
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 15 May 2013 15:59:01 -0700 |
parents | 408bf14c6fc4 |
children | ef8f3a19c94b |
files | ChangeLog tests/test-spawn.c tests/test-sys_socket.c tests/test-sys_wait.c |
diffstat | 4 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- a/tests/test-spawn.c +++ b/tests/test-spawn.c @@ -40,7 +40,7 @@ int main (void) { - switch (0) + switch (POSIX_SPAWN_RESETIDS) { case POSIX_SPAWN_RESETIDS: case POSIX_SPAWN_SETPGROUP:
--- a/tests/test-sys_socket.c +++ b/tests/test-sys_socket.c @@ -47,7 +47,7 @@ sa_family_t i; /* Check some errno values. */ - switch (0) + switch (ENOTSOCK) { case ENOTSOCK: case EADDRINUSE:
--- a/tests/test-sys_wait.c +++ b/tests/test-sys_wait.c @@ -31,17 +31,17 @@ if (test_sys_wait_macros ()) return 1; - switch (0) +#if 0 + switch (WCONTINUED) { -#if 0 /* Gnulib doesn't guarantee these, yet. */ case WCONTINUED: case WEXITED: case WNOWAIT: case WSTOPPED: -#endif break; } +#endif return a ? 1 : 0; }