fix(log): Fixes Coverity false positive in va_list initialization

This commit is contained in:
Konstantin Kondrashov
2025-08-20 14:04:43 +03:00
committed by BOT
parent 9b11b69a46
commit ca2ccf164c
3 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ void __attribute__((optimize("-O3"))) esp_log(esp_log_config_t config, const cha
#else // ESP_LOG_VERSION == 2
if (is_level_loggable(config)) {
#endif
va_list args;
va_list args = {0};
va_start(args, format);
esp_log_va(config, tag, format, args);
va_end(args);

View File

@@ -12,7 +12,7 @@
void esp_log_printf(esp_log_config_t config, const char *format, ...)
{
va_list args;
va_list args = {0};
va_start(args, format);
esp_log_vprintf(config, format, args);
va_end(args);

View File

@@ -37,7 +37,7 @@ void esp_log_write(esp_log_level_t level,
const char *tag,
const char *format, ...)
{
va_list list;
va_list list = {0};
va_start(list, format);
esp_log_va(ESP_LOG_CONFIG_INIT(level), tag, format, list);
va_end(list);