forked from espressif/esp-idf
esp_http_client: remove "Wno-format" cflag and fix formatting errors
This commit is contained in:
@@ -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
|
# lwip is a public requirement because esp_http_client.h includes sys/socket.h
|
||||||
REQUIRES lwip
|
REQUIRES lwip
|
||||||
PRIV_REQUIRES tcp_transport http_parser)
|
PRIV_REQUIRES tcp_transport http_parser)
|
||||||
|
|
||||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_log.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->data_offset = parser->nread;
|
||||||
client->response->content_length = parser->content_length;
|
client->response->content_length = parser->content_length;
|
||||||
client->response->data_process = 0;
|
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;
|
client->state = HTTP_STATE_RES_COMPLETE_HEADER;
|
||||||
if (client->connection_info.method == HTTP_METHOD_HEAD) {
|
if (client->connection_info.method == HTTP_METHOD_HEAD) {
|
||||||
/* In a HTTP_RESPONSE parser returning '1' from on_headers_complete will tell the
|
/* In a HTTP_RESPONSE parser returning '1' from on_headers_complete will tell the
|
||||||
|
Reference in New Issue
Block a user