1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 09:45:21 +03:00

#2619 - Valgrind complains on EEPROM block erase

Should not change anything though.
This commit is contained in:
Bertrand Songis 2015-08-03 22:33:28 +02:00
parent 25d233e832
commit 10832ad60a

View file

@ -99,7 +99,8 @@ void eepromEraseBlock(uint32_t address, bool blocking=true)
// TRACE("eepromEraseBlock(%d)", address);
#if defined(SIMU)
static uint8_t erasedBlock[EEPROM_BLOCK_SIZE] = { 0xff };
static uint8_t erasedBlock[EEPROM_BLOCK_SIZE]; // can't be on the stack!
memset(erasedBlock, 0xff, sizeof(erasedBlock));
eeprom_pointer = address;
eeprom_buffer_data = erasedBlock;
eeprom_buffer_size = EEPROM_BLOCK_SIZE;
@ -442,6 +443,8 @@ void eeCheck(bool immediately)
eepromWriteWait();
}
assert(eepromWriteState == EEPROM_IDLE);
if (s_eeDirtyMsk & EE_GENERAL) {
TRACE("eeprom write general");
s_eeDirtyMsk -= EE_GENERAL;