From 98bf3efeb6833fb078e2a9b765b4fa017c4bbfd9 Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Fri, 2 Sep 2022 10:02:34 +0200 Subject: [PATCH] esp_modem: Fix format warnings Closes https://github.com/espressif/esp-protocols/issues/79 --- components/esp_modem/CMakeLists.txt | 2 -- components/esp_modem/src/esp_modem_netif.cpp | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/esp_modem/CMakeLists.txt b/components/esp_modem/CMakeLists.txt index 404b74a22..10d39577c 100644 --- a/components/esp_modem/CMakeLists.txt +++ b/components/esp_modem/CMakeLists.txt @@ -47,5 +47,3 @@ if(${target} STREQUAL "linux") # This is needed for ESP_LOGx() macros, as integer formats differ on ESP32(..) and x64 set_target_properties(${COMPONENT_LIB} PROPERTIES COMPILE_FLAGS -Wno-format) endif() - -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/esp_modem/src/esp_modem_netif.cpp b/components/esp_modem/src/esp_modem_netif.cpp index 263f09b99..fa731f145 100644 --- a/components/esp_modem/src/esp_modem_netif.cpp +++ b/components/esp_modem/src/esp_modem_netif.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include "cxx_include/esp_modem_netif.hpp" @@ -28,7 +29,7 @@ void Netif::on_ppp_changed(void *arg, esp_event_base_t event_base, { auto *ppp = static_cast(arg); if (event_id < NETIF_PP_PHASE_OFFSET) { - ESP_LOGI("esp_modem_netif", "PPP state changed event %d", event_id); + ESP_LOGI("esp_modem_netif", "PPP state changed event %" PRId32, event_id); // only notify the modem on state/error events, ignoring phase transitions ppp->signal.set(PPP_EXIT); }