libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 80ff0e15965e75532e9cd127bf06ec20ee4f1816
parent a3e227ea1590bc2dc3c46bd708b842d4d3818828
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 30 Oct 2017 18:39:47 +0300

tests: fixed some 'unused return value' compiler warnings

Diffstat:
Msrc/testcurl/https/test_empty_response.c | 2+-
Msrc/testcurl/https/test_https_get_select.c | 2+-
Msrc/testcurl/https/test_https_time_out.c | 2+-
Msrc/testcurl/test_concurrent_stop.c | 6+++---
Msrc/testcurl/test_get_response_cleanup.c | 16++++++++--------
Msrc/testcurl/test_iplimit.c | 4++--
Msrc/testcurl/test_post.c | 2+-
Msrc/testcurl/test_quiesce_stream.c | 4++--
Msrc/testcurl/test_termination.c | 2+-
Msrc/testzzuf/socat.c | 4++--
10 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c @@ -181,7 +181,7 @@ testInternalSelectGet () } } else - sleep (1); + (void)sleep (1); curl_multi_perform (multi, &running); if (running == 0) { diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c @@ -207,7 +207,7 @@ testExternalGet (int flags) } } else - sleep (1); + (void)sleep (1); curl_multi_perform (multi, &running); if (running == 0) { diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c @@ -84,7 +84,7 @@ test_tls_session_time_out (gnutls_session_t session, int port) return -1; } - sleep (TIME_OUT + 1); + (void)sleep (TIME_OUT + 1); /* check that server has closed the connection */ /* TODO better RST trigger */ diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c @@ -181,7 +181,7 @@ do_gets (void * param) _exit(99); } } - sleep (1); + (void)sleep (1); for (j=0;j<PAR;j++) { pthread_cancel(par[j]); @@ -226,7 +226,7 @@ testMultithreadedGet (int port, port = (int)dinfo->port; } p = start_gets (port); - sleep (1); + (void)sleep (1); MHD_stop_daemon (d); pthread_join (p, NULL); return 0; @@ -257,7 +257,7 @@ testMultithreadedPoolGet (int port, port = (int)dinfo->port; } p = start_gets (port); - sleep (1); + (void)sleep (1); MHD_stop_daemon (d); pthread_join (p, NULL); return 0; diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c @@ -180,9 +180,9 @@ testInternalGet () } sprintf(url, "http://127.0.0.1:%d/", port); curl = fork_curl (url); - sleep (1); + (void)sleep (1); kill_curl (curl); - sleep (1); + (void)sleep (1); // fprintf (stderr, "Stopping daemon!\n"); MHD_stop_daemon (d); if (ok != 0) @@ -226,11 +226,11 @@ testMultithreadedGet () sprintf(url, "http://127.0.0.1:%d/", port); //fprintf (stderr, "Forking cURL!\n"); curl = fork_curl (url); - sleep (1); + (void)sleep (1); kill_curl (curl); - sleep (1); + (void)sleep (1); curl = fork_curl (url); - sleep (1); + (void)sleep (1); if (ok != 0) { kill_curl (curl); @@ -238,7 +238,7 @@ testMultithreadedGet () return 64; } kill_curl (curl); - sleep (1); + (void)sleep (1); //fprintf (stderr, "Stopping daemon!\n"); MHD_stop_daemon (d); if (ok != 0) @@ -281,9 +281,9 @@ testMultithreadedPoolGet () } sprintf(url, "http://127.0.0.1:%d/", port); curl = fork_curl (url); - sleep (1); + (void)sleep (1); kill_curl (curl); - sleep (1); + (void)sleep (1); //fprintf (stderr, "Stopping daemon!\n"); MHD_stop_daemon (d); if (ok != 0) diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c @@ -196,7 +196,7 @@ testMultithreadedGet () return 32; } - sleep(2); + (void)sleep(2); for (i = 0; i < 2; ++i) { @@ -310,7 +310,7 @@ testMultithreadedPoolGet () for (i = 0; i < 3; ++i) curl_easy_cleanup (cenv[i]); - sleep(2); + (void)sleep(2); for (i = 0; i < 2; ++i) { diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c @@ -607,7 +607,7 @@ readBuffer(void *p, size_t size, size_t nmemb, void *opaque) static size_t slowReadBuffer(void *p, size_t size, size_t nmemb, void *opaque) { - sleep(1); + (void)sleep(1); return readBuffer(p, size, nmemb, opaque); } diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c @@ -215,14 +215,14 @@ main(void) } /* wait for a request */ while (0 == request_counter) - sleep (1); + (void)sleep (1); fprintf (stderr, "quiesce\n"); MHD_quiesce_daemon (daemon); /* wait a second */ - sleep (1); + (void)sleep (1); fprintf (stderr, "stopping daemon\n"); diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c @@ -130,7 +130,7 @@ main () exit (1); } /* CPU used to go crazy here */ - sleep (1); + (void)sleep (1); curl_easy_cleanup (curl); MHD_stop_daemon (daemon); diff --git a/src/testzzuf/socat.c b/src/testzzuf/socat.c @@ -73,7 +73,7 @@ zzuf_socat_start () } if (zzuf_pid != 0) { - sleep (1); /* allow zzuf and socat to start */ + (void)sleep (1); /* allow zzuf and socat to start */ status = 0; if (0 < waitpid (zzuf_pid, &status, WNOHANG)) { @@ -106,7 +106,7 @@ zzuf_socat_stop () fprintf (stderr, "Failed to killpg: %s\n", strerror (errno)); kill (zzuf_pid, SIGINT); waitpid (zzuf_pid, &status, 0); - sleep (1); /* allow socat to also die in peace */ + (void)sleep (1); /* allow socat to also die in peace */ } }