From a9bfe7b72f0fc8d028772c18a2388cb573c3d79f Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 1 Mar 2017 20:31:56 +0100 Subject: [PATCH] Fix compiling httpd for LWIP_HTTPD_SUPPORT_POST==1 (assigning int to u16_t) --- src/apps/httpd/httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index 4853eacc..7c2dfe62 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -1753,8 +1753,8 @@ http_post_request(struct pbuf *inp, struct http_state *hs, if (content_len >= 0) { /* adjust length of HTTP header passed to application */ const char *hdr_start_after_uri = uri_end + 1; - u16_t hdr_len = LWIP_MIN(data_len, crlfcrlf + 4 - data); - u16_t hdr_data_len = LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); + u16_t hdr_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - data); + u16_t hdr_data_len = (u16_t)LWIP_MIN(data_len, crlfcrlf + 4 - hdr_start_after_uri); u8_t post_auto_wnd = 1; http_uri_buf[0] = 0; /* trim http header */