feat(build): add COMPILER_STATIC_ANALYZER option

This commit is contained in:
Alexey Lapshin
2024-06-06 15:23:02 +07:00
committed by BOT
parent e1b9985bd0
commit ed6e497c6f
46 changed files with 265 additions and 41 deletions

View File

@@ -25,6 +25,7 @@
#include "pthread_internal.h"
#include "esp_pthread.h"
#include "esp_compiler.h"
#include "esp_log.h"
const static char *TAG = "pthread";
@@ -165,7 +166,10 @@ esp_err_t esp_pthread_set_cfg(const esp_pthread_cfg_t *cfg)
*p = *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")
}
esp_err_t esp_pthread_get_cfg(esp_pthread_cfg_t *p)