From b2dc0c8344c32bf3dc802c69fe6992da690fff85 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Jul 2020 14:13:58 +1000 Subject: [PATCH] AP_FlashStorage: fixed alignment errors --- .../AP_FlashStorage/examples/FlashTest/FlashTest.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp b/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp index bb7ab5a8fb..f617b4850a 100644 --- a/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp +++ b/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp @@ -6,6 +6,7 @@ #include #include #include +#include const AP_HAL::HAL& hal = AP_HAL::get_HAL(); @@ -60,11 +61,11 @@ bool FlashTest::flash_write(uint8_t sector, uint32_t offset, const uint8_t *data (unsigned)offset, (unsigned)length); } - const uint16_t *data16 = (const uint16_t *)data; - uint16_t *b16 = (uint16_t *)&b[0]; uint16_t len16 = length/2; for (uint16_t i=0; i