AP_Bootloader: ignore cast alignment when reading from flash

This commit is contained in:
Siddharth Purohit 2021-06-26 13:19:34 +05:30 committed by Andrew Tridgell
parent 0e7571c733
commit 1af2453b54

View File

@ -110,10 +110,15 @@ void flash_set_keep_unlocked(bool set)
/*
read a word at offset relative to flash base
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
uint32_t flash_func_read_word(uint32_t offset)
{
return *(const uint32_t *)(flash_base + offset);
}
#pragma pop
bool flash_func_write_word(uint32_t offset, uint32_t v)
{