@@ -189,8 +189,8 @@ bool WebServer::_parseRequest(NetworkClient &client) {
189189 _currentHandler->raw (*this , _currentUri, *_currentRaw);
190190 _currentRaw->status = RAW_WRITE;
191191
192- while (_currentRaw->totalSize < _clientContentLength) {
193- size_t read_len = std::min (_clientContentLength - _currentRaw->totalSize , (size_t )HTTP_RAW_BUFLEN);
192+ while (_currentRaw->totalSize < ( size_t ) _clientContentLength) {
193+ size_t read_len = std::min (( size_t ) _clientContentLength - _currentRaw->totalSize , (size_t )HTTP_RAW_BUFLEN);
194194 _currentRaw->currentSize = client.readBytes (_currentRaw->buf , read_len);
195195 _currentRaw->totalSize += _currentRaw->currentSize ;
196196 if (_currentRaw->currentSize == 0 ) {
@@ -205,8 +205,8 @@ bool WebServer::_parseRequest(NetworkClient &client) {
205205 log_v (" Finish Raw" );
206206 } else if (!isForm) {
207207 size_t plainLength;
208- char *plainBuf = readBytesWithTimeout (client, _clientContentLength, plainLength, HTTP_MAX_POST_WAIT);
209- if (plainLength < _clientContentLength) {
208+ char *plainBuf = readBytesWithTimeout (client, _clientContentLength, plainLength, HTTP_MAX_POST_WAIT);
209+ if (plainLength < ( size_t ) _clientContentLength) {
210210 free (plainBuf);
211211 return false ;
212212 }
@@ -407,7 +407,7 @@ int WebServer::_uploadReadByte(NetworkClient &client) {
407407
408408bool WebServer::_parseForm (NetworkClient &client, const String &boundary, uint32_t len) {
409409 (void )len;
410- log_v (" Parse Form: Boundary: %s Length: %d " , boundary.c_str (), len);
410+ log_v (" Parse Form: Boundary: %s Length: %u " , boundary.c_str (), len);
411411 String line;
412412 int retry = 0 ;
413413 do {
@@ -432,7 +432,7 @@ bool WebServer::_parseForm(NetworkClient &client, const String &boundary, uint32
432432
433433 line = client.readStringUntil (' \r ' );
434434 client.readStringUntil (' \n ' );
435- if (line.length () > 19 && line.substring (0 , 19 ).equalsIgnoreCase (F (" Content-Disposition" ))) {
435+ if (line.length () > ( size_t ) 19 && line.substring (0 , 19 ).equalsIgnoreCase (F (" Content-Disposition" ))) {
436436 int nameStart = line.indexOf (' =' );
437437 if (nameStart != -1 ) {
438438 argName = line.substring (nameStart + 2 );
@@ -455,7 +455,7 @@ bool WebServer::_parseForm(NetworkClient &client, const String &boundary, uint32
455455 line = client.readStringUntil (' \r ' );
456456 client.readStringUntil (' \n ' );
457457 while (line.length () > 0 ) {
458- if (line.length () > 12 && line.substring (0 , 12 ).equalsIgnoreCase (FPSTR (Content_Type))) {
458+ if (line.length () > ( size_t ) 12 && line.substring (0 , 12 ).equalsIgnoreCase (FPSTR (Content_Type))) {
459459 argType = line.substring (line.indexOf (' :' ) + 2 );
460460 }
461461 // skip over any other headers
@@ -470,7 +470,7 @@ bool WebServer::_parseForm(NetworkClient &client, const String &boundary, uint32
470470 if (line.startsWith (" --" + boundary)) {
471471 break ;
472472 }
473- if (argValue.length () > 0 ) {
473+ if (argValue.length () > ( size_t ) 0 ) {
474474 argValue += " \n " ;
475475 }
476476 argValue += line;
0 commit comments