[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed compiler warni
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed compiler warning |
Date: |
Tue, 09 May 2017 21:57:41 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 7cb47792 Fixed compiler warning
7cb47792 is described below
commit 7cb47792c7ab27b6fd4564874863f0a8e82a0ff6
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Tue May 9 22:56:02 2017 +0300
Fixed compiler warning
---
src/microhttpd/connection.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index e3bf9e29..38d439ef 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2079,7 +2079,11 @@ process_request_body (struct MHD_Connection *connection)
used = processed;
connection->client_aware = true;
{
- size_t processed_st = (size_t) processed;
+ size_t processed_st;
+ if (processed > SIZE_MAX)
+ processed_st = SIZE_MAX;
+ else
+ processed_st = (size_t) processed;
if (MHD_NO ==
connection->daemon->default_handler
(connection->daemon->default_handler_cls,
connection,
@@ -2097,7 +2101,7 @@ process_request_body (struct MHD_Connection *connection)
}
processed = (uint64_t) processed_st;
}
- if (processed > used)
+ if (processed > (uint64_t)used)
mhd_panic (mhd_panic_cls,
__FILE__,
__LINE__
@@ -2120,7 +2124,7 @@ process_request_body (struct MHD_Connection *connection)
_("WARNING: incomplete POST processing and connection not
suspended will result in hung connection.\n"));
#endif
}
- used -= processed;
+ used -= (size_t)processed; /* 'processed' is less than SIZE_MAX */
if (connection->have_chunked_upload)
connection->current_chunk_offset += used;
/* dh left "processed" bytes in buffer for next time... */
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed compiler warning,
gnunet <=