[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/03: Fixed some compiler warnings
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/03: Fixed some compiler warnings |
Date: |
Wed, 05 Apr 2017 12:00:19 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit e30143507e9dd805e2a0b0be25ea75974e74105a
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Wed Apr 5 11:33:33 2017 +0300
Fixed some compiler warnings
---
src/microhttpd/connection.c | 2 +-
src/microhttpd/daemon.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 29be44f1..b86f1e52 100644
--- 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
index a4a9a2b8..c2bd59f8 100644
--- 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;
--
To stop receiving notification emails like this one, please contact
address@hidden