Clean up build warnings (#4169)
* [build][OSX] Fix clang warnings. * [build][OSX] A few more warnings taken care of. * [build] Fixed yet more build warnings across all platforms. * [build] Fix final warning due to bad CMake flag. * [build] Remove unused variables as requested, fix indent. * Fix output display limit type for 8-bit targets.
This commit is contained in:
committed by
Bertrand Songis
parent
1666fd7355
commit
1eead1504c
@@ -193,7 +193,7 @@ unsigned long Er9xInterface::load(RadioData &radioData, const uint8_t *eeprom, i
|
||||
return errors.to_ulong();
|
||||
}
|
||||
|
||||
unsigned long Er9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
|
||||
unsigned long Er9xInterface::loadBackup(RadioData &radioData, const uint8_t *eeprom, int esize, int index)
|
||||
{
|
||||
std::bitset<NUM_ERRORS> errors;
|
||||
errors.set(UNKNOWN_ERROR);
|
||||
|
||||
@@ -43,7 +43,7 @@ class Er9xInterface : public EEPROMInterface
|
||||
|
||||
virtual unsigned long load(RadioData &, const uint8_t * eeprom, int size);
|
||||
|
||||
virtual unsigned long loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
|
||||
virtual unsigned long loadBackup(RadioData &, const uint8_t * eeprom, int esize, int index);
|
||||
|
||||
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ unsigned long Ersky9xInterface::load(RadioData &radioData, const uint8_t *eeprom
|
||||
return errors.to_ulong();
|
||||
}
|
||||
|
||||
unsigned long Ersky9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index)
|
||||
unsigned long Ersky9xInterface::loadBackup(RadioData &radioData, const uint8_t *eeprom, int esize, int index)
|
||||
{
|
||||
std::bitset<NUM_ERRORS> errors;
|
||||
errors.set(UNKNOWN_ERROR);
|
||||
|
||||
@@ -43,7 +43,7 @@ class Ersky9xInterface : public EEPROMInterface
|
||||
|
||||
virtual unsigned long load(RadioData &, const uint8_t * eeprom, int size);
|
||||
|
||||
virtual unsigned long loadBackup(RadioData &, uint8_t * eeprom, int esize, int index);
|
||||
virtual unsigned long loadBackup(RadioData &, const uint8_t * eeprom, int esize, int index);
|
||||
|
||||
virtual unsigned long loadxml(RadioData &radioData, QDomDocument &doc);
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ QString LogsDialog::formatTimeDelta(double timeDelta)
|
||||
return QString("%1 s").arg(timeDelta, 1, 'f', 1);
|
||||
}
|
||||
|
||||
int seconds = (int)round(abs(timeDelta));
|
||||
int seconds = (int)round(fabs(timeDelta));
|
||||
int hours = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
int minutes = seconds / 60;
|
||||
|
||||
@@ -121,7 +121,6 @@ class TelemetrySimulator : public QDialog
|
||||
bool stepping;
|
||||
QDateTime parseTransmittterTimestamp(QString row);
|
||||
void calcLogFrequency();
|
||||
int32_t replayRate;
|
||||
};
|
||||
|
||||
private:
|
||||
@@ -162,8 +161,6 @@ private:
|
||||
uint32_t cellData1;
|
||||
uint32_t cellData2;
|
||||
uint32_t cellData3;
|
||||
uint32_t cellDataTime;
|
||||
double cell[MAXCELLS];
|
||||
};
|
||||
|
||||
class GPSEmulator
|
||||
@@ -185,7 +182,6 @@ private:
|
||||
double course;
|
||||
double speedKNTS;
|
||||
double altitude; // in meters
|
||||
uint32_t nextDataIndex;
|
||||
uint32_t encodeLatLon(double latLon, bool isLat);
|
||||
uint32_t encodeDateTime(uint8_t yearOrHour, uint8_t monthOrMinute, uint8_t dayOrSecond, bool isDate);
|
||||
};
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
#ifdef MOUNTED_GETMNTINFO
|
||||
|
||||
# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
|
||||
# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME && !defined(__clang__)
|
||||
static const char *
|
||||
fstype_to_string (short int t)
|
||||
{
|
||||
@@ -323,6 +323,7 @@ fstype_to_string (short int t)
|
||||
}
|
||||
# endif
|
||||
|
||||
#if !defined(__clang__)
|
||||
static const char *
|
||||
fsp_to_string (const struct statfs *fsp)
|
||||
{
|
||||
@@ -332,6 +333,7 @@ fsp_to_string (const struct statfs *fsp)
|
||||
return fstype_to_string (fsp->f_type);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MOUNTED_GETMNTINFO */
|
||||
|
||||
@@ -918,7 +920,7 @@ read_file_system_list (bool need_fs_type)
|
||||
*mtail = NULL;
|
||||
return mount_list;
|
||||
|
||||
|
||||
#if !defined(__clang__)
|
||||
free_then_fail:
|
||||
{
|
||||
int saved_errno = errno;
|
||||
@@ -938,6 +940,7 @@ read_file_system_list (bool need_fs_type)
|
||||
errno = saved_errno;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void free_file_system_list(struct mount_entry * mount_list)
|
||||
|
||||
Reference in New Issue
Block a user