diff --git a/components/esp_http_server/CMakeLists.txt b/components/esp_http_server/CMakeLists.txt index d098ec067d..c660da3aa5 100644 --- a/components/esp_http_server/CMakeLists.txt +++ b/components/esp_http_server/CMakeLists.txt @@ -9,5 +9,3 @@ idf_component_register(SRCS "src/httpd_main.c" PRIV_INCLUDE_DIRS "src/port/esp32" "src/util" REQUIRES esp_event http_parser # for http_parser.h PRIV_REQUIRES lwip mbedtls esp_timer) - -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/esp_http_server/src/httpd_parse.c b/components/esp_http_server/src/httpd_parse.c index 5ff8aafa0e..9c27c297a5 100644 --- a/components/esp_http_server/src/httpd_parse.c +++ b/components/esp_http_server/src/httpd_parse.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "esp_httpd_priv.h" @@ -364,7 +365,7 @@ static esp_err_t cb_headers_complete(http_parser *parser) r->content_len = ((int)parser->content_length != -1 ? parser->content_length : 0); - ESP_LOGD(TAG, LOG_FMT("bytes read = %d"), parser->nread); + ESP_LOGD(TAG, LOG_FMT("bytes read = %" PRId32 ""), parser->nread); ESP_LOGD(TAG, LOG_FMT("content length = %zu"), r->content_len); /* Handle upgrade requests - only WebSocket is supported for now */ diff --git a/components/esp_https_ota/CMakeLists.txt b/components/esp_https_ota/CMakeLists.txt index b4d88d02a5..6dfe5f9ac4 100644 --- a/components/esp_https_ota/CMakeLists.txt +++ b/components/esp_https_ota/CMakeLists.txt @@ -2,5 +2,3 @@ idf_component_register(SRCS "src/esp_https_ota.c" INCLUDE_DIRS "include" REQUIRES esp_http_client bootloader_support esp_app_format esp_event PRIV_REQUIRES log app_update) - -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/esp_https_ota/src/esp_https_ota.c b/components/esp_https_ota/src/esp_https_ota.c index 9302830d92..9541093f4d 100644 --- a/components/esp_https_ota/src/esp_https_ota.c +++ b/components/esp_https_ota/src/esp_https_ota.c @@ -12,6 +12,7 @@ #include #include #include +#include ESP_EVENT_DEFINE_BASE(ESP_HTTPS_OTA_EVENT); @@ -342,7 +343,7 @@ esp_err_t esp_https_ota_begin(const esp_https_ota_config_t *ota_config, esp_http err = ESP_FAIL; goto http_cleanup; } - ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x", + ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%" PRIx32, https_ota_handle->update_partition->subtype, https_ota_handle->update_partition->address); const int alloc_size = MAX(ota_config->http_config->buffer_size, DEFAULT_OTA_BUF_SIZE);