diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c b/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c index b6cb8f9adb..b193ec3b8d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c @@ -85,7 +85,13 @@ void malloc_init(void) // check for changes which indicate a write to an uninitialised // object. We start at address 0x1 as writing the first byte // causes a fault +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#if defined(__GNUC__) && __GNUC__ >= 10 +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif memset((void*)0x00000001, 0, 1023); +#pragma GCC diagnostic pop #endif uint8_t i;