aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-02-22 18:25:07 +0100
committerChristian Grothoff <christian@grothoff.org>2018-02-22 18:25:07 +0100
commit786887049671035a05d63ed5eaca5c30083d2050 (patch)
treee0501717235e21ded4006d867d2b3cfc0ab02cf7 /src
parent7021246581ac32b6a2010bf4afd4685b54369259 (diff)
downloadlibmicrohttpd-786887049671035a05d63ed5eaca5c30083d2050.tar.gz
libmicrohttpd-786887049671035a05d63ed5eaca5c30083d2050.zip
eliminate compiler warnings from dead assignments
Diffstat (limited to 'src')
-rw-r--r--src/lib/connection_add.c3
-rw-r--r--src/lib/connection_call_handlers.c2
-rw-r--r--src/lib/daemon_start.c4
-rw-r--r--src/microhttpd/connection.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/connection_add.c b/src/lib/connection_add.c
index f1584b1b..39a61f61 100644
--- a/src/lib/connection_add.c
+++ b/src/lib/connection_add.c
@@ -888,9 +888,8 @@ internal_add_connection (struct MHD_Daemon *daemon,
888#ifdef HAVE_MESSAGES 888#ifdef HAVE_MESSAGES
889 MHD_DLOG (daemon, 889 MHD_DLOG (daemon,
890 MHD_SC_ITC_USE_FAILED, 890 MHD_SC_ITC_USE_FAILED,
891 _("Failed to signal new connection via inter-thread communication channel.")); 891 _("Failed to signal new connection via inter-thread communication channel (not necessarily fatal, continuing anyway)."));
892#endif 892#endif
893 sc = MHD_SC_ITC_USE_FAILED;
894 } 893 }
895 return MHD_SC_OK; 894 return MHD_SC_OK;
896 895
diff --git a/src/lib/connection_call_handlers.c b/src/lib/connection_call_handlers.c
index bc64da30..a6358cce 100644
--- 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)
1307 must_add_keep_alive = false; 1307 must_add_keep_alive = false;
1308 must_add_content_length = false; 1308 must_add_content_length = false;
1309 response_has_close = false; 1309 response_has_close = false;
1310 response_has_keepalive = false;
1311 switch (request->state) 1310 switch (request->state)
1312 { 1311 {
1313 case MHD_REQUEST_FOOTERS_RECEIVED: 1312 case MHD_REQUEST_FOOTERS_RECEIVED:
@@ -1444,6 +1443,7 @@ build_header_response (struct MHD_Request *request)
1444 break; 1443 break;
1445 default: 1444 default:
1446 mhd_assert (0); 1445 mhd_assert (0);
1446 return MHD_NO;
1447 } 1447 }
1448 1448
1449 if (MHD_CONN_MUST_CLOSE != request->keepalive) 1449 if (MHD_CONN_MUST_CLOSE != request->keepalive)
diff --git a/src/lib/daemon_start.c b/src/lib/daemon_start.c
index c6349c6d..a3099d75 100644
--- a/src/lib/daemon_start.c
+++ b/src/lib/daemon_start.c
@@ -761,12 +761,12 @@ setup_thread_pool (struct MHD_Daemon *daemon)
761 _("Failed to create pool thread: %s\n"), 761 _("Failed to create pool thread: %s\n"),
762 MHD_strerror_ (errno)); 762 MHD_strerror_ (errno));
763#endif 763#endif
764 sc = MHD_SC_THREAD_POOL_LAUNCH_FAILURE;
765 /* Free memory for this worker; cleanup below handles 764 /* Free memory for this worker; cleanup below handles
766 * all previously-created workers. */ 765 * all previously-created workers. */
767 if (! daemon->disable_itc) 766 if (! daemon->disable_itc)
768 MHD_itc_destroy_chk_ (d->itc); 767 MHD_itc_destroy_chk_ (d->itc);
769 MHD_mutex_destroy_chk_ (&d->cleanup_connection_mutex); 768 MHD_mutex_destroy_chk_ (&d->cleanup_connection_mutex);
769 sc = MHD_SC_THREAD_POOL_LAUNCH_FAILURE;
770 goto thread_failed; 770 goto thread_failed;
771 } 771 }
772 } /* end for() */ 772 } /* end for() */
@@ -792,7 +792,7 @@ thread_failed:
792 requested. */ 792 requested. */
793 daemon->worker_pool_size = i; 793 daemon->worker_pool_size = i;
794 daemon->listen_socket = MHD_daemon_quiesce (daemon); 794 daemon->listen_socket = MHD_daemon_quiesce (daemon);
795 return MHD_SC_THREAD_LAUNCH_FAILURE; 795 return sc;
796} 796}
797 797
798 798
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 3a2e6c43..6a58e04a 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1478,7 +1478,6 @@ build_header_response (struct MHD_Connection *connection)
1478 must_add_keep_alive = MHD_NO; 1478 must_add_keep_alive = MHD_NO;
1479 must_add_content_length = MHD_NO; 1479 must_add_content_length = MHD_NO;
1480 response_has_close = false; 1480 response_has_close = false;
1481 response_has_keepalive = false;
1482 switch (connection->state) 1481 switch (connection->state)
1483 { 1482 {
1484 case MHD_CONNECTION_FOOTERS_RECEIVED: 1483 case MHD_CONNECTION_FOOTERS_RECEIVED:
@@ -1612,6 +1611,7 @@ build_header_response (struct MHD_Connection *connection)
1612 break; 1611 break;
1613 default: 1612 default:
1614 mhd_assert (0); 1613 mhd_assert (0);
1614 return MHD_NO;
1615 } 1615 }
1616 1616
1617 if (MHD_CONN_MUST_CLOSE != connection->keepalive) 1617 if (MHD_CONN_MUST_CLOSE != connection->keepalive)