HAL_ChibiOS: fixed build error with gcc 11.3

This commit is contained in:
Andrew Tridgell 2022-10-04 20:11:53 +11:00
parent b5b1aee954
commit e5b46eb2a7

View File

@ -85,7 +85,13 @@ void malloc_init(void)
// check for changes which indicate a write to an uninitialised // check for changes which indicate a write to an uninitialised
// object. We start at address 0x1 as writing the first byte // object. We start at address 0x1 as writing the first byte
// causes a fault // 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); memset((void*)0x00000001, 0, 1023);
#pragma GCC diagnostic pop
#endif #endif
uint8_t i; uint8_t i;