chore: Cleanup some compiler warnings (#2864)

This commit is contained in:
philmoz
2022-12-16 10:24:28 +10:00
committed by GitHub
parent 86687d8f73
commit a1c55a5b02
10 changed files with 14 additions and 11 deletions
-1
View File
@@ -247,7 +247,6 @@ void CurveDialog::updateCurve()
Node * nodel = 0; Node * nodel = 0;
Node * nodex = 0; Node * nodex = 0;
QColor color;
scene->clear(); scene->clear();
@@ -33,8 +33,6 @@ SimulatedUIWidgetX9D2019::SimulatedUIWidgetX9D2019(SimulatorInterface *simulator
// add actions in order of appearance on the help menu // add actions in order of appearance on the help menu
QPoint ctr(70, 100);
act = new RadioUiAction(0, QList<int>() << Qt::Key_Up << Qt::Key_PageUp, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU); act = new RadioUiAction(0, QList<int>() << Qt::Key_Up << Qt::Key_PageUp, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU);
addRadioWidget(ui->leftbuttons->addArea(QRect(25, 40, 80, 35), "X9D2019/left_menu.png", act)); addRadioWidget(ui->leftbuttons->addArea(QRect(25, 40, 80, 35), "X9D2019/left_menu.png", act));
@@ -13,8 +13,6 @@ SimulatedUIWidgetX9LITE::SimulatedUIWidgetX9LITE(SimulatorInterface *simulator,
// add actions in order of appearance on the help menu // add actions in order of appearance on the help menu
QPoint ctr(70, 91);
act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp << Qt::Key_Up, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU_ICN); act = new RadioUiAction(0, QList<int>() << Qt::Key_PageUp << Qt::Key_Up, SIMU_STR_HLP_KEYS_GO_UP, SIMU_STR_HLP_ACT_MENU_ICN);
addRadioWidget(ui->leftbuttons->addArea(QRect(80, 20, 40, 35), "X9LITE/left_menu.png", act)); addRadioWidget(ui->leftbuttons->addArea(QRect(80, 20, 40, 35), "X9LITE/left_menu.png", act));
+3 -3
View File
@@ -34,9 +34,9 @@ class YamlFormat : public StorageFormat
{ {
} }
virtual QString name() { return "yml"; } virtual QString name() override { return "yml"; }
virtual bool load(RadioData & radioData); virtual bool load(RadioData & radioData) override;
virtual bool write(const RadioData & radioData) { return false; } virtual bool write(const RadioData & radioData) override { return false; }
virtual bool writeModel(const RadioData & radioData, const int modelIndex) override; virtual bool writeModel(const RadioData & radioData, const int modelIndex) override;
protected: protected:
+2
View File
@@ -176,6 +176,8 @@ class ButtonHolder : public FormWindow
_buttons[1].sortState = 0; _buttons[1].sortState = 0;
_buttons[1].button->setBitmap(_buttons[1].states[1]); _buttons[1].button->setBitmap(_buttons[1].states[1]);
break; break;
default:
break;
} }
} }
+3
View File
@@ -178,6 +178,9 @@ void ThemeFile::deSerialize()
info[INFO_LENGTH] = '\0'; info[INFO_LENGTH] = '\0';
} }
} break; } break;
default:
break;
} }
} }
+1 -1
View File
@@ -258,7 +258,7 @@ class ModelsList : public ModelsVector
bool isModelIdUnique(uint8_t moduleIdx, char *warn_buf, size_t warn_buf_len); bool isModelIdUnique(uint8_t moduleIdx, char *warn_buf, size_t warn_buf_len);
uint8_t findNextUnusedModelId(uint8_t moduleIdx); uint8_t findNextUnusedModelId(uint8_t moduleIdx);
typedef struct { typedef struct _filedat {
std::string name; std::string name;
char hash[FILE_HASH_LENGTH + 1]; char hash[FILE_HASH_LENGTH + 1];
bool curmodel = false; bool curmodel = false;
+1 -1
View File
@@ -625,7 +625,7 @@ char *getSourceString(char (&dest)[L], mixsrc_t idx)
if (g_model.scriptsData[qr.quot].name[0] != '\0') { if (g_model.scriptsData[qr.quot].name[0] != '\0') {
// instance Name is not empty : dest = InstanceName/OutputName // instance Name is not empty : dest = InstanceName/OutputName
snprintf(pos, dest_len, "%.*s/%.*s", sizeof(g_model.scriptsData[qr.quot].name), g_model.scriptsData[qr.quot].name, snprintf(pos, dest_len, "%.*s/%.*s", (int)sizeof(g_model.scriptsData[qr.quot].name), g_model.scriptsData[qr.quot].name,
(int)sizeof(scriptInputsOutputs[qr.quot].outputs[qr.rem].name), scriptInputsOutputs[qr.quot].outputs[qr.rem].name); (int)sizeof(scriptInputsOutputs[qr.quot].outputs[qr.rem].name), scriptInputsOutputs[qr.quot].outputs[qr.rem].name);
} else { } else {
// instance Name is empty : dest = n-ScriptFileName/OutputName // instance Name is empty : dest = n-ScriptFileName/OutputName
+1 -1
View File
@@ -29,7 +29,7 @@
#include "intmodule_serial_driver.h" #include "intmodule_serial_driver.h"
#endif #endif
static_assert(PXX2_FRAME_MAXLENGTH <= INTMODULE_FIFO_SIZE); static_assert(PXX2_FRAME_MAXLENGTH <= INTMODULE_FIFO_SIZE, "");
static void processGetHardwareInfoFrame(uint8_t module, const uint8_t * frame) static void processGetHardwareInfoFrame(uint8_t module, const uint8_t * frame)
{ {
+3
View File
@@ -720,6 +720,9 @@ void processMultiTelemetryData(uint8_t data, uint8_t module)
setMultiTelemetryBufferState(module, NoProtocolDetected); setMultiTelemetryBufferState(module, NoProtocolDetected);
} }
break; break;
default:
break;
} }
} }