all: Replaces memset/memcpy with hal_mem.. funcs where were used -Wstringop-overread, -Wstringop-overflow, -Warray-bounds

hal: Adds hal_memcpy and hal_memset
This commit is contained in:
KonstantinKondrashov
2022-11-19 01:42:43 +08:00
parent 81fa1ecb6d
commit 9fd8f3786a
13 changed files with 76 additions and 219 deletions

View File

@@ -160,11 +160,7 @@ static void update_rtc_retain_mem_crc(void)
NOINLINE_ATTR void bootloader_common_reset_rtc_retain_mem(void)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
#pragma GCC diagnostic pop
hal_memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
}
uint16_t bootloader_common_get_rtc_retain_mem_reboot_counter(void)