From 1d5c381b4eaf65686cec02f04572cf2abe50e71d Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 11 May 2017 21:28:27 +0300 Subject: [PATCH] Compiler warning minor fixes --- src/microhttpd/connection.c | 11 +++++++++++ src/microhttpd/daemon.c | 2 +- src/microhttpd/internal.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 803eccba..a65757e3 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -1587,6 +1587,14 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection) case MHD_CONNECTION_CLOSED: connection->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; return; /* do nothing, not even reading */ + case MHD_CONNECTION_IN_CLEANUP: + EXTRA_CHECK (0); + break; +#ifdef UPGRADE_SUPPORT + case MHD_CONNECTION_UPGRADE: + EXTRA_CHECK (0); + break; +#endif /* UPGRADE_SUPPORT */ default: EXTRA_CHECK (0); } @@ -2784,6 +2792,9 @@ MHD_connection_handle_write (struct MHD_Connection *connection) case MHD_TLS_CONNECTION_INIT: EXTRA_CHECK (0); break; + case MHD_CONNECTION_IN_CLEANUP: + EXTRA_CHECK (0); + break; #ifdef UPGRADE_SUPPORT case MHD_CONNECTION_UPGRADE: EXTRA_CHECK (0); diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 526773e1..4bc61d76 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -779,7 +779,7 @@ urh_to_fdset (struct MHD_UpgradeResponseHandle *urh, * @param urh upgrade handle to update * @param rs read result from select() * @param ws write result from select() - * @param ws except result from select() + * @param es except result from select() */ static void urh_from_fdset (struct MHD_UpgradeResponseHandle *urh, diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index e2d8cfb6..a77e0a04 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h @@ -568,7 +568,7 @@ typedef ssize_t */ typedef ssize_t (*TransmitCallback) (struct MHD_Connection *conn, - const void *write_to, + const void *read_from, size_t max_bytes);