armcm_boot: fix array bounds warning

Arm GCC 11.2 generates an array bounds warning when
dereferencing a 64-bit pointer.  Selectively disable the
warning when handling the bootup code.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-07-21 06:03:38 -04:00
parent a8c83c519c
commit 88c5107818
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B

View File

@ -19,6 +19,9 @@ extern uint32_t _data_start, _data_end, _data_flash;
extern uint32_t _bss_start, _bss_end, _stack_start;
extern uint32_t _stack_end;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
uint64_t
get_bootup_code(void)
{
@ -34,6 +37,8 @@ set_bootup_code(uint64_t code)
barrier();
}
#pragma GCC diagnostic pop
// Helper function to read area of flash
void
application_read_flash(uint32_t address, uint32_t *dest)