From fcba75d86d7ff285fa80440376b48529903cf45a Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 16 Nov 2021 16:06:46 +0100 Subject: [PATCH] cpu/arm7_common: suppress false positives of cppcheck --- cpu/arm7_common/arm7_init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cpu/arm7_common/arm7_init.c b/cpu/arm7_common/arm7_init.c index c5e4d903a8..ed8f1e842c 100644 --- a/cpu/arm7_common/arm7_init.c +++ b/cpu/arm7_common/arm7_init.c @@ -64,6 +64,9 @@ static inline void _init_data(void) dst = &__stack_usr_start; end = &__stack_end; + /* cppcheck-suppress comparePointers + * (addresses exported as symbols via linker script and look unrelated + * to cppcheck) */ while (dst < end) { *(dst++) = STACK_CANARY_WORD; } @@ -74,6 +77,9 @@ static inline void _init_data(void) dst = &_srelocate; end = &_erelocate; + /* cppcheck-suppress comparePointers + * (addresses exported as symbols via linker script and look unrelated + * to cppcheck) */ while (dst < end) { *dst++ = *src++; } @@ -82,6 +88,9 @@ static inline void _init_data(void) dst = &_szero; end = &_ezero; + /* cppcheck-suppress comparePointers + * (addresses exported as symbols via linker script and look unrelated + * to cppcheck) */ while (dst < end) { *dst++ = 0; } @@ -97,6 +106,9 @@ static inline void _init_data(void) dst = _sbackup_data; end = _ebackup_data; + /* cppcheck-suppress comparePointers + * (addresses exported as symbols via linker script and look unrelated + * to cppcheck) */ while (dst < end) { *dst++ = *src++; } @@ -105,6 +117,9 @@ static inline void _init_data(void) dst = _sbackup_bss; end = _ebackup_bss; + /* cppcheck-suppress comparePointers + * (addresses exported as symbols via linker script and look unrelated + * to cppcheck) */ while (dst < end) { *dst++ = 0; }