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:
1 file changed
+5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user