From 7779bc51cd29721f4cbd7b48b36645d8b9efcccc Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 11 Apr 2017 07:50:02 +0200 Subject: [PATCH] Remove unused pointer startP (#4770) Clang complains about startP pointer pointing to a member of a packed structure, resulting on in a unaligned pointered address. The compiler will optimise the pointer out anyway --- radio/src/storage/eeprom_rlc.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/radio/src/storage/eeprom_rlc.cpp b/radio/src/storage/eeprom_rlc.cpp index 7d3b3929a..28898fb43 100644 --- a/radio/src/storage/eeprom_rlc.cpp +++ b/radio/src/storage/eeprom_rlc.cpp @@ -137,9 +137,8 @@ void eepromCheck() #if defined(CPUARM) blocksCount = 0; #endif - blkid_t *startP = (i==MAXFILES ? &eeFs.freeList : &eeFs.files[i].startBlk); + blkid_t blk = (i==MAXFILES ? eeFs.freeList : eeFs.files[i].startBlk); blkid_t lastBlk = 0; - blk = *startP; while (blk) { if (blk < FIRSTBLK || // bad blk index blk >= BLOCKS || // bad blk indexchan @@ -149,7 +148,6 @@ void eepromCheck() EeFsSetLink(lastBlk, 0); } else { - *startP = 0; // interrupt chain at startpos EeFsFlush(); } blk = 0; // abort