Browse Source

Fix compiler warning bugs

QGC4.4
Don Gagne 11 years ago
parent
commit
25edde5951
  1. 2
      src/AutoPilotPlugins/PX4/FlightModesComponent.cc
  2. 2
      src/VehicleSetup/SetupView.cc

2
src/AutoPilotPlugins/PX4/FlightModesComponent.cc

@ -143,7 +143,7 @@ QList<QStringList> FlightModesComponent::summaryItems(void) const
// Switch is not mapped // Switch is not mapped
if (i == 0) { if (i == 0) {
// Mode switch is required // Mode switch is required
Q_ASSERT(switchList[0].param == "RC_MAP_MODE_SW"); Q_ASSERT(strcmp(switchList[0].param, "RC_MAP_MODE_SW") == 0);
row << "Setup required"; row << "Setup required";
} else { } else {
row << "None"; row << "None";

2
src/VehicleSetup/SetupView.cc

@ -118,7 +118,9 @@ void SetupView::_clearComponentButtons(void)
QLayoutItem* item; QLayoutItem* item;
while ((item = _ui->componentButtonLayout->itemAt(0))) { while ((item = _ui->componentButtonLayout->itemAt(0))) {
VehicleComponentButton* componentButton = dynamic_cast<VehicleComponentButton*>(item->widget()); VehicleComponentButton* componentButton = dynamic_cast<VehicleComponentButton*>(item->widget());
// Make sure this is really a VehicleComponentButton. If it isn't the UI has changed but the code hasn't.
Q_ASSERT(componentButton); Q_ASSERT(componentButton);
Q_UNUSED(componentButton);
_ui->componentButtonLayout->removeWidget(item->widget()); _ui->componentButtonLayout->removeWidget(item->widget());
} }
} }

Loading…
Cancel
Save