1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 10:52:44 +01:00

cpu/cortexm_common: Suppress cppcheck errors

cpu/cortexm_common/thread_arch.c:262: error (comparePointers): Comparing pointers that point to different objects
cpu/cortexm_common/thread_arch.c:266: error (comparePointers): Subtracting pointers that point to different objects
This commit is contained in:
Erik Ekman 2021-11-25 11:09:15 +01:00
parent 46f599c1a9
commit b5f96d2040

View File

@ -259,10 +259,12 @@ int thread_isr_stack_usage(void)
{
uint32_t *ptr = &_sstack;
while(((*ptr) == STACK_CANARY_WORD) && (ptr < &_estack)) {
/* cppcheck-suppress comparePointers */
while (((*ptr) == STACK_CANARY_WORD) && (ptr < &_estack)) {
++ptr;
}
/* cppcheck-suppress comparePointers */
ptrdiff_t num_used_words = &_estack - ptr;
return num_used_words * sizeof(*ptr);
}