Fix compile of Simon's last change on MSVC

This commit is contained in:
Dirk Ziegelmeier 2016-04-26 13:19:32 +02:00
parent 025d5591eb
commit afd1bb938e
2 changed files with 3 additions and 3 deletions

View File

@ -2037,7 +2037,7 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct tcp_pcb *pcb)
return http_find_error_file(hs, 501); return http_find_error_file(hs, 501);
} }
/* if we come here, method is OK, parse URI */ /* if we come here, method is OK, parse URI */
left_len = data_len - ((sp1 +1) - data); left_len = (u16_t)(data_len - ((sp1 +1) - data));
sp2 = strnstr(sp1 + 1, " ", left_len); sp2 = strnstr(sp1 + 1, " ", left_len);
#if LWIP_HTTPD_SUPPORT_V09 #if LWIP_HTTPD_SUPPORT_V09
if (sp2 == NULL) { if (sp2 == NULL) {
@ -2052,7 +2052,7 @@ http_parse_request(struct pbuf *inp, struct http_state *hs, struct tcp_pcb *pcb)
#endif /* LWIP_HTTPD_SUPPORT_POST */ #endif /* LWIP_HTTPD_SUPPORT_POST */
} }
#endif /* LWIP_HTTPD_SUPPORT_V09 */ #endif /* LWIP_HTTPD_SUPPORT_V09 */
uri_len = sp2 - (sp1 + 1); uri_len = (u16_t)(sp2 - (sp1 + 1));
if ((sp2 != 0) && (sp2 > sp1)) { if ((sp2 != 0) && (sp2 > sp1)) {
/* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */ /* wait for CRLFCRLF (indicating end of HTTP headers) before parsing anything */
if (strnstr(data, CRLF CRLF, data_len) != NULL) { if (strnstr(data, CRLF CRLF, data_len) != NULL) {

View File

@ -563,7 +563,7 @@ u8_t* get_file_data(const char* filename, int* file_size, int can_be_compressed,
} }
} }
#else #else
LWIP_UNUSED_ARG(compress); LWIP_UNUSED_ARG(can_be_compressed);
#endif #endif
fclose(inFile); fclose(inFile);
return buf; return buf;