From 5e4d6190d8dbaa868e9a15184e63ea48ce51c73d Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Wed, 4 Sep 2024 11:08:00 +0700 Subject: [PATCH] fix(pthread): fix GCC 14 analyzer warnings --- components/pthread/pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pthread/pthread.c b/components/pthread/pthread.c index 898a2264e1..51931c0d02 100644 --- a/components/pthread/pthread.c +++ b/components/pthread/pthread.c @@ -163,6 +163,7 @@ esp_err_t esp_pthread_set_cfg(const esp_pthread_cfg_t *cfg) /* If a value is already set, update that value */ esp_pthread_cfg_t *p = pthread_getspecific(s_pthread_cfg_key); + ESP_COMPILER_DIAGNOSTIC_PUSH_IGNORE("-Wanalyzer-malloc-leak") // ignore leak of 'p' if (!p) { p = malloc(sizeof(esp_pthread_cfg_t)); if (!p) { @@ -173,7 +174,6 @@ esp_err_t esp_pthread_set_cfg(const esp_pthread_cfg_t *cfg) p->stack_alloc_caps = heap_caps; pthread_setspecific(s_pthread_cfg_key, p); - ESP_COMPILER_DIAGNOSTIC_PUSH_IGNORE("-Wanalyzer-malloc-leak") // ignore leak of 'p' return 0; ESP_COMPILER_DIAGNOSTIC_POP("-Wanalyzer-malloc-leak") }