From 6c304267770241ed1b79394328d684375dfdc41f Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Wed, 9 Feb 2022 17:16:37 +0700 Subject: [PATCH] ulp_riscv: suppress -Wstringop-overflow --- components/ulp/ulp_riscv/ulp_riscv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ulp/ulp_riscv/ulp_riscv.c b/components/ulp/ulp_riscv/ulp_riscv.c index aa828c40a4..588d13bef5 100644 --- a/components/ulp/ulp_riscv/ulp_riscv.c +++ b/components/ulp/ulp_riscv/ulp_riscv.c @@ -159,8 +159,12 @@ esp_err_t ulp_riscv_load_binary(const uint8_t* program_binary, size_t program_si uint8_t* base = (uint8_t*) RTC_SLOW_MEM; //Start by clearing memory reserved with zeros, this will also will initialize the bss: +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#pragma GCC diagnostic ignored "-Warray-bounds" memset(base, 0, CONFIG_ULP_COPROC_RESERVE_MEM); memcpy(base, program_binary, program_size_bytes); +#pragma GCC diagnostic pop return ESP_OK; }