[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: Fixed compiler warning
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: Fixed compiler warning |
Date: |
Tue, 15 Dec 2020 20:44:38 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit d98105b91b7ef63adf56fe808c92657fea927c59
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Dec 15 22:09:00 2020 +0300
Fixed compiler warning
---
src/microhttpd/mhd_send.c | 2 +-
src/microhttpd/response.c | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 11de6a19..bed850ce 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -858,7 +858,7 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
(((size_t) SSIZE_MAX > header_size)) &&
(0 != body_size) )
{
- int ret2;
+ ssize_t ret2;
/* The header has been sent completely.
* Try to send the reply body without waiting for
* the next round. */
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index f4dc361c..a77dbe27 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -546,9 +546,17 @@ pipe_reader (void *cls,
ssize_t n;
(void) pos;
+#ifndef _WIN32
+ if (SSIZE_MAX < max)
+ max = SSIZE_MAX;
+#else /* _WIN32 */
+ if (UINT_MAX < max)
+ max = UINT_MAX;
+#endif /* _WIN32 */
+
n = read (response->fd,
buf,
- max);
+ (MHD_SCKT_SEND_SIZE_) max);
if (0 == n)
return MHD_CONTENT_READER_END_OF_STREAM;
if (n < 0)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.