From f5635a557afe249cc253293ffba44ad42e23e1da Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 28 Oct 2019 16:22:17 +1100 Subject: [PATCH] AP_FlashStorage: correct format-string warnings --- .../examples/FlashTest/FlashTest.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp b/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp index 8dbf003311..a487127c8c 100644 --- a/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp +++ b/libraries/AP_FlashStorage/examples/FlashTest/FlashTest.cpp @@ -56,7 +56,9 @@ bool FlashTest::flash_write(uint8_t sector, uint32_t offset, const uint8_t *data uint8_t *b = &flash[sector][offset]; if ((offset & 1) || (length & 1)) { AP_HAL::panic("FATAL: invalid write at %u:%u len=%u\n", - sector, offset, length); + (unsigned)sector, + (unsigned)offset, + (unsigned)length); } const uint16_t *data16 = (const uint16_t *)data; uint16_t *b16 = (uint16_t *)&b[0]; @@ -64,12 +66,18 @@ bool FlashTest::flash_write(uint8_t sector, uint32_t offset, const uint8_t *data for (uint16_t i=0; i