diff --git a/plugins/channelrx/demodpacket/packetdemod.cpp b/plugins/channelrx/demodpacket/packetdemod.cpp index 242968501..068d9fb88 100644 --- a/plugins/channelrx/demodpacket/packetdemod.cpp +++ b/plugins/channelrx/demodpacket/packetdemod.cpp @@ -187,7 +187,7 @@ void PacketDemod::applySettings(const PacketDemodSettings& settings, bool force) QList reverseAPIKeys; - if ((settings.m_inputFrequencyOffset != settings.m_inputFrequencyOffset) || force) { + if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) { reverseAPIKeys.append("inputFrequencyOffset"); } if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) { diff --git a/plugins/channelrx/demodpacket/packetdemodgui.cpp b/plugins/channelrx/demodpacket/packetdemodgui.cpp index c11cdfb58..464ad61df 100644 --- a/plugins/channelrx/demodpacket/packetdemodgui.cpp +++ b/plugins/channelrx/demodpacket/packetdemodgui.cpp @@ -175,7 +175,6 @@ void PacketDemodGUI::packetReceived(QByteArray packet) QTableWidgetItem *pidItem = new QTableWidgetItem(); QTableWidgetItem *dataASCIIItem = new QTableWidgetItem(); QTableWidgetItem *dataHexItem = new QTableWidgetItem(); - QTableWidgetItem *dataAPRSItem = new QTableWidgetItem(); ui->packets->setItem(row, PACKET_COL_FROM, fromItem); ui->packets->setItem(row, PACKET_COL_TO, toItem); ui->packets->setItem(row, PACKET_COL_VIA, viaItem); @@ -260,6 +259,7 @@ void PacketDemodGUI::on_deltaFrequency_changed(qint64 value) void PacketDemodGUI::on_mode_currentIndexChanged(int value) { + (void) value; QString mode = ui->mode->currentText(); // TODO: Support 9600 FSK } diff --git a/plugins/feature/aprs/aprs.cpp b/plugins/feature/aprs/aprs.cpp index ab6a30c59..51e072f93 100644 --- a/plugins/feature/aprs/aprs.cpp +++ b/plugins/feature/aprs/aprs.cpp @@ -221,6 +221,8 @@ int APRS::webapiRun(bool run, SWGSDRangel::SWGDeviceState& response, QString& errorMessage) { + (void) run; + (void) response; (void) errorMessage; //getFeatureStateStr(*response.getState()); //MsgStartStopIGate *msg = MsgStartStopIGate::create(run); diff --git a/plugins/feature/aprs/aprsgui.cpp b/plugins/feature/aprs/aprsgui.cpp index 9733dcd4b..4e7326178 100644 --- a/plugins/feature/aprs/aprsgui.cpp +++ b/plugins/feature/aprs/aprsgui.cpp @@ -299,7 +299,7 @@ bool APRSGUI::handleMessage(const Message& message) { for (int j = 0; j < 8; j++) telemetryStation->m_telemetryBitSense[j] = aprs->m_telemetryBitSense[j]; - telemetryStation->m_hasTelemetryBitSense; + telemetryStation->m_hasTelemetryBitSense = true; telemetryStation->m_telemetryProjectName = aprs->m_telemetryProjectName; } if (ui->stationSelect->currentText() == aprs->m_addressee) @@ -972,6 +972,7 @@ void APRSGUI::on_stationFilter_currentIndexChanged(int index) void APRSGUI::on_stationSelect_currentIndexChanged(int index) { + (void) index; QString stationCallsign = ui->stationSelect->currentText(); APRSStation *station = m_stations.value(stationCallsign); @@ -1189,11 +1190,13 @@ void APRSGUI::plotWeather() void APRSGUI::on_weatherTimeSelect_currentIndexChanged(int index) { + (void) index; plotWeather(); } void APRSGUI::on_weatherPlotSelect_currentIndexChanged(int index) { + (void) index; plotWeather(); } @@ -1399,11 +1402,13 @@ void APRSGUI::plotMotion() void APRSGUI::on_motionTimeSelect_currentIndexChanged(int index) { + (void) index; plotMotion(); } void APRSGUI::on_motionPlotSelect_currentIndexChanged(int index) { + (void) index; plotMotion(); } @@ -1479,11 +1484,13 @@ void APRSGUI::plotTelemetry() void APRSGUI::on_telemetryTimeSelect_currentIndexChanged(int index) { + (void) index; plotTelemetry(); } void APRSGUI::on_telemetryPlotSelect_currentIndexChanged(int index) { + (void) index; plotTelemetry(); } diff --git a/plugins/feature/map/map.cpp b/plugins/feature/map/map.cpp index 0b71366e2..91558ccad 100644 --- a/plugins/feature/map/map.cpp +++ b/plugins/feature/map/map.cpp @@ -159,6 +159,7 @@ int Map::webapiRun(bool run, SWGSDRangel::SWGDeviceState& response, QString& errorMessage) { + (void) run; (void) errorMessage; getFeatureStateStr(*response.getState()); return 202; diff --git a/plugins/feature/startracker/startrackergui.cpp b/plugins/feature/startracker/startrackergui.cpp index 460ae2643..8686cc4c0 100644 --- a/plugins/feature/startracker/startrackergui.cpp +++ b/plugins/feature/startracker/startrackergui.cpp @@ -456,6 +456,7 @@ void StarTrackerGUI::applySettings(bool force) void StarTrackerGUI::on_useMyPosition_clicked(bool checked) { + (void) checked; double stationLatitude = MainCore::instance()->getSettings().getLatitude(); double stationLongitude = MainCore::instance()->getSettings().getLongitude(); double stationAltitude = MainCore::instance()->getSettings().getAltitude(); @@ -495,6 +496,7 @@ void StarTrackerGUI::on_dateTimeSelect_currentTextChanged(const QString &text) void StarTrackerGUI::on_dateTime_dateTimeChanged(const QDateTime &datetime) { + (void) datetime; if (ui->dateTimeSelect->currentIndex() == 1) { m_settings.m_dateTime = ui->dateTime->dateTime().toString(Qt::ISODateWithMs); diff --git a/plugins/feature/startracker/startrackersettingsdialog.cpp b/plugins/feature/startracker/startrackersettingsdialog.cpp index 5cd7a127c..f5dd6cbcd 100644 --- a/plugins/feature/startracker/startrackersettingsdialog.cpp +++ b/plugins/feature/startracker/startrackersettingsdialog.cpp @@ -21,8 +21,8 @@ StarTrackerSettingsDialog::StarTrackerSettingsDialog(StarTrackerSettings *settings, QWidget* parent) : QDialog(parent), - ui(new Ui::StarTrackerSettingsDialog), - m_settings(settings) + m_settings(settings), + ui(new Ui::StarTrackerSettingsDialog) { ui->setupUi(this); ui->epoch->setCurrentIndex(settings->m_jnow ? 1 : 0); diff --git a/sdrbase/feature/featurewebapiutils.cpp b/sdrbase/feature/featurewebapiutils.cpp index 33c07ee44..ec8e09bd7 100644 --- a/sdrbase/feature/featurewebapiutils.cpp +++ b/sdrbase/feature/featurewebapiutils.cpp @@ -42,7 +42,7 @@ bool FeatureWebAPIUtils::mapFind(const QString& target, int featureSetIndex, int int httpRC = feature->webapiActionsPost(featureActionKeys, query, errorMessage); if (httpRC/100 != 2) { - qWarning("FeatureWebAPIUtils::mapFind: error %d: %s", httpRC, errorMessage); + qWarning() << "FeatureWebAPIUtils::mapFind: error " << httpRC << ":" << errorMessage; return false; } @@ -65,7 +65,7 @@ Feature* FeatureWebAPIUtils::getFeature(int featureSetIndex, int featureIndex, c if (featureSetIndex != -1) { // Find feature with specific index - if (featureSetIndex < featureSets.size()) + if (featureSetIndex < (int)featureSets.size()) { featureSet = featureSets[featureSetIndex]; if (featureIndex < featureSet->getNumberOfFeatures()) diff --git a/sdrbase/maincore.h b/sdrbase/maincore.h index 1de9ecd46..1fc77834d 100644 --- a/sdrbase/maincore.h +++ b/sdrbase/maincore.h @@ -22,6 +22,7 @@ #include #include +#include #include "export.h" #include "settings/mainsettings.h" diff --git a/sdrbase/util/aprs.cpp b/sdrbase/util/aprs.cpp index 634e91b16..ee2029e13 100644 --- a/sdrbase/util/aprs.cpp +++ b/sdrbase/util/aprs.cpp @@ -47,7 +47,6 @@ bool APRSPacket::decode(AX25Packet packet) // First byte of information field is data type ID char dataType = packet.m_dataASCII[0].toLatin1(); - bool timestamp = false; int idx = 1; switch (dataType) { @@ -914,7 +913,6 @@ bool APRSPacket::parseMessage(QString& info, int& idx) } else if (m_message.startsWith("BITS.")) { - bool done = false; QString s(""); int i = 5; for (int j = 0; j < 8; j++) diff --git a/sdrbase/util/astronomy.cpp b/sdrbase/util/astronomy.cpp index 76544449b..c09b3103c 100644 --- a/sdrbase/util/astronomy.cpp +++ b/sdrbase/util/astronomy.cpp @@ -287,11 +287,7 @@ void Astronomy::moonPosition(AzAlt& aa, RADec& rd, double latitude, double longi double ecl = Units::degreesToRadians(23.4393 - 3.563E-7 * d); // Obliquity of the ecliptic - tilt of Earth's axis of rotation // Orbital elements for the Sun - double Ns = 0.0; - double is = 0.0; double ws = Units::degreesToRadians(282.9404 + 4.70935E-5 * d); - double as = 1.0; // (AU) - double es = 0.016709 - 1.151E-9 * d; // ecs double Ms = Units::degreesToRadians(356.0470 + 0.9856002585 * d); // Orbital elements for the Moon @@ -416,7 +412,7 @@ double Astronomy::refractionSaemundsson(double alt, double pressure, double temp { double pt = (pressure/1010.0) * (283.0/(273.0+temperature)); - return (1.02 / tan(Units::degreesToRadians(alt+10.3/(alt+5.11))) + 0.0019279) / 60.0; + return pt * (1.02 / tan(Units::degreesToRadians(alt+10.3/(alt+5.11))) + 0.0019279) / 60.0; } // Calculated adjustment to altitude angle from true to apparent due to atmospheric refraction using diff --git a/sdrbase/util/ax25.cpp b/sdrbase/util/ax25.cpp index 6d562d8e2..9fdfbccb6 100644 --- a/sdrbase/util/ax25.cpp +++ b/sdrbase/util/ax25.cpp @@ -39,11 +39,11 @@ bool AX25Packet::decode(QByteArray packet) // Address - ASCII shifted right one bit for (i = 0; i < 6; i++) destAddress[i] = (packet[i] >> 1) & 0x7f; - destAddress[6] = NULL; + destAddress[6] = '\0'; destSSID = packet[6]; for (i = 0; i < 6; i++) sourceAddress[i] = (packet[7+i] >> 1) & 0x7f; - sourceAddress[6] = NULL; + sourceAddress[6] = '\0'; sourceSSID = packet[13]; // From = source address @@ -66,7 +66,7 @@ bool AX25Packet::decode(QByteArray packet) i++; for (j = 0; j < 6; j++) repeaterAddress[j] = (packet[i+j] >> 1) & 0x7f; - repeaterAddress[j] = NULL; + repeaterAddress[j] = '\0'; i += 6; repeaterSSID = packet[i]; ssid = (repeaterSSID >> 1) & 0xf; diff --git a/sdrbase/util/maidenhead.cpp b/sdrbase/util/maidenhead.cpp index d7c6eab5d..7cdda6957 100644 --- a/sdrbase/util/maidenhead.cpp +++ b/sdrbase/util/maidenhead.cpp @@ -17,6 +17,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include + #include #include "maidenhead.h"