aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-12 07:45:50 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-12 07:45:50 +0000
commit4f9c53c222ce07b4f02474ddcc45000d6638250f (patch)
treec920266242ffc45ccf0c224adf8a1bfb4db18723 /src
parentc461ee5489068066b9752ef9de179f3ccf75015b (diff)
downloadlibmicrohttpd-4f9c53c222ce07b4f02474ddcc45000d6638250f.tar.gz
libmicrohttpd-4f9c53c222ce07b4f02474ddcc45000d6638250f.zip
-fix compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/daemon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index b2a057b2..4613ae32 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1037,7 +1037,9 @@ recv_param_adapter (struct MHD_Connection *connection,
1037 size_t i) 1037 size_t i)
1038{ 1038{
1039 ssize_t ret; 1039 ssize_t ret;
1040#if EPOLL_SUPPORT
1040 const size_t requested_size = i; 1041 const size_t requested_size = i;
1042#endif
1041 1043
1042 if ( (MHD_INVALID_SOCKET == connection->socket_fd) || 1044 if ( (MHD_INVALID_SOCKET == connection->socket_fd) ||
1043 (MHD_CONNECTION_CLOSED == connection->state) ) 1045 (MHD_CONNECTION_CLOSED == connection->state) )
@@ -1055,7 +1057,7 @@ recv_param_adapter (struct MHD_Connection *connection,
1055 1057
1056 ret = recv(connection->socket_fd, other, i, MSG_NOSIGNAL); 1058 ret = recv(connection->socket_fd, other, i, MSG_NOSIGNAL);
1057#if EPOLL_SUPPORT 1059#if EPOLL_SUPPORT
1058 if (0 > ret || requested_size > (size_t) ret) 1060 if ( (0 > ret) || (requested_size > (size_t) ret))
1059 { 1061 {
1060 /* partial read --- no longer read-ready */ 1062 /* partial read --- no longer read-ready */
1061 connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY; 1063 connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY;
@@ -1079,7 +1081,9 @@ send_param_adapter (struct MHD_Connection *connection,
1079 size_t i) 1081 size_t i)
1080{ 1082{
1081 ssize_t ret; 1083 ssize_t ret;
1084#if EPOLL_SUPPORT
1082 const size_t requested_size = i; 1085 const size_t requested_size = i;
1086#endif
1083#if LINUX 1087#if LINUX
1084 MHD_socket fd; 1088 MHD_socket fd;
1085#endif 1089#endif
@@ -1151,7 +1155,7 @@ send_param_adapter (struct MHD_Connection *connection,
1151#endif 1155#endif
1152 ret = send (connection->socket_fd, other, i, MSG_NOSIGNAL); 1156 ret = send (connection->socket_fd, other, i, MSG_NOSIGNAL);
1153#if EPOLL_SUPPORT 1157#if EPOLL_SUPPORT
1154 if (0 > ret || requested_size > (size_t) ret) 1158 if ( (0 > ret) || (requested_size > (size_t) ret) )
1155 { 1159 {
1156 /* partial write --- no longer write-ready */ 1160 /* partial write --- no longer write-ready */
1157 connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; 1161 connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;