chore(cpn): Remove some compiler warnings (#2752)

This commit is contained in:
Neil Horne
2022-12-06 19:45:39 +10:00
committed by GitHub
parent 3a32f8fd3d
commit 1bb48a087b
3 changed files with 4 additions and 6 deletions
@@ -285,7 +285,7 @@ RawSource YamlRawSourceDecode(const std::string& src_str)
}
if (node.IsScalar() && node.as<std::string>().size() == 12 && node.as<std::string>().substr(0, 11) == "SPACEMOUSE_") {
int sm_idx;
int sm_idx = 0;
node >> spacemouseLut >> sm_idx;
if (sm_idx >= 0) {
rhs.type = SOURCE_TYPE_SPACEMOUSE;
+3 -3
View File
@@ -157,7 +157,7 @@ bool RadioData::deleteLabel(int index)
bool RadioData::renameLabel(QString from, QString to)
{
bool success = true;
bool success = true;
QString csvFrom = escapeCSV(from);
QString csvTo = escapeCSV(to);
int lengthdiff = csvTo.size() - csvFrom.size();
@@ -218,7 +218,7 @@ void RadioData::swapLabel(int indFrom, int indTo)
bool RadioData::addLabelToModel(int index, QString label)
{
if (index >= models.size()) return false;
if ((unsigned int)index >= models.size()) return false;
label = escapeCSV(label);
char *modelLabelCsv = models[index].labels;
@@ -237,7 +237,7 @@ bool RadioData::addLabelToModel(int index, QString label)
bool RadioData::removeLabelFromModel(int index, QString label)
{
if (index >= models.size()) return false;
if ((unsigned int)index >= models.size()) return false;
QStringList lbls = fromCSV(QString::fromUtf8(models[index].labels));
if (lbls.indexOf(label) >= 0) {
-2
View File
@@ -507,8 +507,6 @@ void MdiChild::adjustToolbarLayout()
void MdiChild::initModelsList()
{
Board::Type board = firmware->getBoard();
if (modelsListModel)
delete modelsListModel;