diff --git a/cpu/esp8266/startup.c b/cpu/esp8266/startup.c index e85a197e09..e74a00195b 100644 --- a/cpu/esp8266/startup.c +++ b/cpu/esp8266/startup.c @@ -56,6 +56,7 @@ void esp_riot_init(void) extern uint8_t _rtc_bss_start, _rtc_bss_end; esp_reset_reason_t reset_reason = esp_reset_reason(); if (reset_reason != ESP_RST_DEEPSLEEP && reset_reason != ESP_RST_SW) { + /* cppcheck-suppress comparePointers */ memset(&_rtc_bss_start, 0, (&_rtc_bss_end - &_rtc_bss_start)); } diff --git a/cpu/esp_common/syscalls.c b/cpu/esp_common/syscalls.c index ea42a718b7..57251a28bd 100644 --- a/cpu/esp_common/syscalls.c +++ b/cpu/esp_common/syscalls.c @@ -97,6 +97,7 @@ void IRAM_ATTR _lock_init(_lock_t *lock) memset(mtx, 0, sizeof(mutex_t)); *lock = (_lock_t)mtx; } + /* cppcheck-suppress memleak; mtx is stored in lock */ } void IRAM_ATTR _lock_init_recursive(_lock_t *lock) @@ -128,6 +129,7 @@ void IRAM_ATTR _lock_init_recursive(_lock_t *lock) memset(rmtx, 0, sizeof(rmutex_t)); *lock = (_lock_t)rmtx; } + /* cppcheck-suppress memleak; rmtx is stored in lock */ } void IRAM_ATTR _lock_close(_lock_t *lock) @@ -257,7 +259,7 @@ void IRAM_ATTR _lock_release_recursive(_lock_t *lock) #ifdef MODULE_ESP_IDF_HEAP #define heap_caps_malloc_default(s) heap_caps_malloc(s, MALLOC_CAP_DEFAULT) -#define heap_caps_realloc_default(p,s) heap_caps_realloc(p, s, MALLOC_CAP_DEFAULT) +#define heap_caps_realloc_default(p, s) heap_caps_realloc(p, s, MALLOC_CAP_DEFAULT) void* IRAM_ATTR __wrap__malloc_r(struct _reent *r, size_t size) { @@ -362,6 +364,7 @@ extern uint8_t _eheap3; unsigned int IRAM_ATTR get_free_heap_size(void) { struct mallinfo minfo = mallinfo(); + /* cppcheck-suppress comparePointers */ unsigned int heap_size = &_eheap - &_sheap; #if NUM_HEAPS > 1 heap_size += &_eheap1 - &_sheap1; diff --git a/cpu/esp_common/thread_arch.c b/cpu/esp_common/thread_arch.c index 10cf207a3e..90a67768fc 100644 --- a/cpu/esp_common/thread_arch.c +++ b/cpu/esp_common/thread_arch.c @@ -352,6 +352,7 @@ void thread_isr_stack_init(void) uintptr_t *stackmax = (uintptr_t *)(uintptr_t)sp; uintptr_t *stackp = (uintptr_t *)(uintptr_t)&port_IntStack; + /* cppcheck-suppress comparePointers */ while (stackp < stackmax) { *stackp = (uintptr_t) stackp; stackp++;