diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-15 22:09:00 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-15 22:09:00 +0300 |
commit | d98105b91b7ef63adf56fe808c92657fea927c59 (patch) | |
tree | f8a505b4b277227796d48daad1c2d57393775bb0 | |
parent | c1115185b8c6f85bb51c6f0c20e8db69201a494b (diff) | |
download | libmicrohttpd-d98105b91b7ef63adf56fe808c92657fea927c59.tar.gz libmicrohttpd-d98105b91b7ef63adf56fe808c92657fea927c59.zip |
Fixed compiler warning
-rw-r--r-- | src/microhttpd/mhd_send.c | 2 | ||||
-rw-r--r-- | 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, | |||
858 | (((size_t) SSIZE_MAX > header_size)) && | 858 | (((size_t) SSIZE_MAX > header_size)) && |
859 | (0 != body_size) ) | 859 | (0 != body_size) ) |
860 | { | 860 | { |
861 | int ret2; | 861 | ssize_t ret2; |
862 | /* The header has been sent completely. | 862 | /* The header has been sent completely. |
863 | * Try to send the reply body without waiting for | 863 | * Try to send the reply body without waiting for |
864 | * the next round. */ | 864 | * 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, | |||
546 | ssize_t n; | 546 | ssize_t n; |
547 | 547 | ||
548 | (void) pos; | 548 | (void) pos; |
549 | #ifndef _WIN32 | ||
550 | if (SSIZE_MAX < max) | ||
551 | max = SSIZE_MAX; | ||
552 | #else /* _WIN32 */ | ||
553 | if (UINT_MAX < max) | ||
554 | max = UINT_MAX; | ||
555 | #endif /* _WIN32 */ | ||
556 | |||
549 | n = read (response->fd, | 557 | n = read (response->fd, |
550 | buf, | 558 | buf, |
551 | max); | 559 | (MHD_SCKT_SEND_SIZE_) max); |
552 | if (0 == n) | 560 | if (0 == n) |
553 | return MHD_CONTENT_READER_END_OF_STREAM; | 561 | return MHD_CONTENT_READER_END_OF_STREAM; |
554 | if (n < 0) | 562 | if (n < 0) |