cppcheck experiment. A couple of memory leaks fixed

This commit is contained in:
bsongis
2014-02-26 16:10:12 +01:00
parent 33091c295f
commit 86c0678273
13 changed files with 35 additions and 41 deletions
@@ -62,7 +62,7 @@ bool Th9xInterface::loadxml(RadioData &radioData, QDomDocument &doc)
return false;
}
bool Th9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size)
bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size)
{
std::cout << "trying th9x import... ";
@@ -71,7 +71,7 @@ bool Th9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size)
return false;
}
if (!efile->EeFsOpen(eeprom, size, BOARD_STOCK)) {
if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) {
std::cout << "wrong file system\n";
return false;
}
+1 -1
View File
@@ -34,7 +34,7 @@ class Th9xInterface : public EEPROMInterface
virtual const int getMaxModels();
virtual bool load(RadioData &, uint8_t *eeprom, int size);
virtual bool load(RadioData &, const uint8_t *eeprom, int size);
virtual bool loadBackup(RadioData &, uint8_t *eeprom, int esize, int index);