libmicrohttpd

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

commit 786887049671035a05d63ed5eaca5c30083d2050
parent 7021246581ac32b6a2010bf4afd4685b54369259
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 22 Feb 2018 18:25:07 +0100

eliminate compiler warnings from dead assignments

Diffstat:
Msrc/lib/connection_add.c | 3+--
Msrc/lib/connection_call_handlers.c | 2+-
Msrc/lib/daemon_start.c | 4++--
Msrc/microhttpd/connection.c | 2+-
4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/lib/connection_add.c b/src/lib/connection_add.c @@ -888,9 +888,8 @@ internal_add_connection (struct MHD_Daemon *daemon, #ifdef HAVE_MESSAGES MHD_DLOG (daemon, MHD_SC_ITC_USE_FAILED, - _("Failed to signal new connection via inter-thread communication channel.")); + _("Failed to signal new connection via inter-thread communication channel (not necessarily fatal, continuing anyway).")); #endif - sc = MHD_SC_ITC_USE_FAILED; } return MHD_SC_OK; diff --git a/src/lib/connection_call_handlers.c b/src/lib/connection_call_handlers.c @@ -1307,7 +1307,6 @@ build_header_response (struct MHD_Request *request) must_add_keep_alive = false; must_add_content_length = false; response_has_close = false; - response_has_keepalive = false; switch (request->state) { case MHD_REQUEST_FOOTERS_RECEIVED: @@ -1444,6 +1443,7 @@ build_header_response (struct MHD_Request *request) break; default: mhd_assert (0); + return MHD_NO; } if (MHD_CONN_MUST_CLOSE != request->keepalive) diff --git a/src/lib/daemon_start.c b/src/lib/daemon_start.c @@ -761,12 +761,12 @@ setup_thread_pool (struct MHD_Daemon *daemon) _("Failed to create pool thread: %s\n"), MHD_strerror_ (errno)); #endif - sc = MHD_SC_THREAD_POOL_LAUNCH_FAILURE; /* Free memory for this worker; cleanup below handles * all previously-created workers. */ if (! daemon->disable_itc) MHD_itc_destroy_chk_ (d->itc); MHD_mutex_destroy_chk_ (&d->cleanup_connection_mutex); + sc = MHD_SC_THREAD_POOL_LAUNCH_FAILURE; goto thread_failed; } } /* end for() */ @@ -792,7 +792,7 @@ thread_failed: requested. */ daemon->worker_pool_size = i; daemon->listen_socket = MHD_daemon_quiesce (daemon); - return MHD_SC_THREAD_LAUNCH_FAILURE; + return sc; } diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1478,7 +1478,6 @@ build_header_response (struct MHD_Connection *connection) must_add_keep_alive = MHD_NO; must_add_content_length = MHD_NO; response_has_close = false; - response_has_keepalive = false; switch (connection->state) { case MHD_CONNECTION_FOOTERS_RECEIVED: @@ -1612,6 +1611,7 @@ build_header_response (struct MHD_Connection *connection) break; default: mhd_assert (0); + return MHD_NO; } if (MHD_CONN_MUST_CLOSE != connection->keepalive)