From cb1033abf8ee6640a807e65102d0e9b391cf30ea Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 31 Jan 2022 20:09:06 +0100 Subject: [PATCH] log: fix -Wformat issue when uint32_t == unsigned long --- components/log/include/esp_log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/log/include/esp_log.h b/components/log/include/esp_log.h index a6eb53e565..e5cf473dda 100644 --- a/components/log/include/esp_log.h +++ b/components/log/include/esp_log.h @@ -9,6 +9,7 @@ #include #include +#include #include "sdkconfig.h" #include "esp_rom_sys.h" @@ -278,7 +279,7 @@ void esp_log_writev(esp_log_level_t level, const char* tag, const char* format, #define LOG_RESET_COLOR #endif //CONFIG_LOG_COLORS -#define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%u) %s: " format LOG_RESET_COLOR "\n" +#define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%" PRIu32 ") %s: " format LOG_RESET_COLOR "\n" #define LOG_SYSTEM_TIME_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%s) %s: " format LOG_RESET_COLOR "\n" /** @endcond */