libmicrohttpd

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

commit e30143507e9dd805e2a0b0be25ea75974e74105a
parent c02d8f03320930fe83bae7d1b0751aea2c417186
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed,  5 Apr 2017 11:33:33 +0300

Fixed some compiler warnings

Diffstat:
Msrc/microhttpd/connection.c | 2+-
Msrc/microhttpd/daemon.c | 8++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1743,7 +1743,7 @@ parse_initial_message_line (struct MHD_Connection *connection, while ( (' ' == uri[0]) && ( (size_t)(uri - line) < line_len) ) uri++; - if (uri - line == line_len) + if ((size_t)(uri - line) == line_len) { curi = ""; uri = NULL; diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2169,7 +2169,7 @@ recv_param_adapter (struct MHD_Connection *connection, if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY; } - else if (i > ret) + else if (i > (size_t)ret) connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY; #endif return ret; @@ -2249,7 +2249,7 @@ send_param_adapter (struct MHD_Connection *connection, if (0 < ret) { /* write successful */ - if (left > ret) + if (left > (uint64_t)ret) connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; return ret; } @@ -2286,7 +2286,7 @@ send_param_adapter (struct MHD_Connection *connection, if (MHD_SCKT_ERR_IS_EAGAIN_(err)) connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; } - else if (i > ret) + else if (i > (size_t)ret) connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; #endif /* Handle broken kernel / libc, returning -1 but not setting errno; @@ -3300,7 +3300,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon, else { const time_t second_left = earliest_deadline - now; - if (second_left > ULLONG_MAX / 1000) + if (second_left > ULLONG_MAX / 1000) /* Ignore compiler warning: 'second_left' is always positive. */ *timeout = ULLONG_MAX; else *timeout = 1000LL * second_left;