mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 02:20:57 +02:00
fix(log): Fixes Coverity false positive in va_list initialization
This commit is contained in:
committed by
BOT
parent
9b11b69a46
commit
ca2ccf164c
@@ -83,7 +83,7 @@ void __attribute__((optimize("-O3"))) esp_log(esp_log_config_t config, const cha
|
|||||||
#else // ESP_LOG_VERSION == 2
|
#else // ESP_LOG_VERSION == 2
|
||||||
if (is_level_loggable(config)) {
|
if (is_level_loggable(config)) {
|
||||||
#endif
|
#endif
|
||||||
va_list args;
|
va_list args = {0};
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
esp_log_va(config, tag, format, args);
|
esp_log_va(config, tag, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
void esp_log_printf(esp_log_config_t config, const char *format, ...)
|
void esp_log_printf(esp_log_config_t config, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args = {0};
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
esp_log_vprintf(config, format, args);
|
esp_log_vprintf(config, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
@@ -37,7 +37,7 @@ void esp_log_write(esp_log_level_t level,
|
|||||||
const char *tag,
|
const char *tag,
|
||||||
const char *format, ...)
|
const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list list;
|
va_list list = {0};
|
||||||
va_start(list, format);
|
va_start(list, format);
|
||||||
esp_log_va(ESP_LOG_CONFIG_INIT(level), tag, format, list);
|
esp_log_va(ESP_LOG_CONFIG_INIT(level), tag, format, list);
|
||||||
va_end(list);
|
va_end(list);
|
||||||
|
Reference in New Issue
Block a user