esp_http_client: remove "Wno-format" cflag and fix formatting errors

This commit is contained in:
Mahavir Jain 2022-12-21 11:33:04 +05:30
parent 3a56807568
commit bbc5914e63
No known key found for this signature in database
GPG Key ID: 99324EF4A00734E0
2 changed files with 2 additions and 3 deletions

View File

@ -7,5 +7,3 @@ idf_component_register(SRCS "esp_http_client.c"
# lwip is a public requirement because esp_http_client.h includes sys/socket.h
REQUIRES lwip
PRIV_REQUIRES tcp_transport http_parser)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@ -6,6 +6,7 @@
#include <string.h>
#include <inttypes.h>
#include "esp_system.h"
#include "esp_log.h"
@ -253,7 +254,7 @@ static int http_on_headers_complete(http_parser *parser)
client->response->data_offset = parser->nread;
client->response->content_length = parser->content_length;
client->response->data_process = 0;
ESP_LOGD(TAG, "http_on_headers_complete, status=%d, offset=%d, nread=%d", parser->status_code, client->response->data_offset, parser->nread);
ESP_LOGD(TAG, "http_on_headers_complete, status=%d, offset=%d, nread=%" PRId32, parser->status_code, client->response->data_offset, parser->nread);
client->state = HTTP_STATE_RES_COMPLETE_HEADER;
if (client->connection_info.method == HTTP_METHOD_HEAD) {
/* In a HTTP_RESPONSE parser returning '1' from on_headers_complete will tell the