Additional warning fixes; run brew update before brew install for hamlib

This commit is contained in:
Charles J. Cliffe 2019-01-10 21:23:26 -05:00
parent e75387c25d
commit c57a123130
5 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,7 @@ addons:
- freeglut3-dev - freeglut3-dev
- libhamlib-dev - libhamlib-dev
script: script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install hamlib; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install hamlib; fi
- bash travis-ci/build_liquiddsp.sh - bash travis-ci/build_liquiddsp.sh
- bash travis-ci/build_soapysdr.sh - bash travis-ci/build_soapysdr.sh

View File

@ -1301,7 +1301,9 @@ bool AppFrame::actionOnMenuAbout(wxCommandEvent& event) {
bool AppFrame::actionOnMenuSettings(wxCommandEvent& event) { bool AppFrame::actionOnMenuSettings(wxCommandEvent& event) {
if (event.GetId() >= wxID_ANTENNAS_BASE && event.GetId() < wxID_ANTENNAS_BASE + antennaNames.size()) { int antennaIdMax = wxID_ANTENNAS_BASE + antennaNames.size();
if (event.GetId() >= wxID_ANTENNAS_BASE && event.GetId() < antennaIdMax) {
wxGetApp().setAntennaName(antennaNames[event.GetId() - wxID_ANTENNAS_BASE]); wxGetApp().setAntennaName(antennaNames[event.GetId() - wxID_ANTENNAS_BASE]);
@ -1720,7 +1722,9 @@ bool AppFrame::actionOnMenuRig(wxCommandEvent& event) {
bManaged = true; bManaged = true;
} }
if (event.GetId() >= wxID_RIG_SERIAL_BASE && event.GetId() < wxID_RIG_SERIAL_BASE + rigSerialRates.size()) { int rigSerialIdMax = wxID_RIG_SERIAL_BASE + rigSerialRates.size();
if (event.GetId() >= wxID_RIG_SERIAL_BASE && event.GetId() < rigSerialIdMax) {
int serialIdx = event.GetId() - wxID_RIG_SERIAL_BASE; int serialIdx = event.GetId() - wxID_RIG_SERIAL_BASE;
rigSerialRate = rigSerialRates[serialIdx]; rigSerialRate = rigSerialRates[serialIdx];
resetRig = true; resetRig = true;

View File

@ -498,8 +498,9 @@ std::string SDRDevicesDialog::getSelectedChoiceOption(wxPGProperty* prop, const
int choiceIndex = prop->GetChoiceSelection(); int choiceIndex = prop->GetChoiceSelection();
if (arg.options.size() > 0) { if (arg.options.size() > 0) {
int choiceMax = arg.options.size();
if (choiceIndex >= 0 && choiceIndex < arg.options.size()) {
if (choiceIndex >= 0 && choiceIndex < choiceMax) {
//normal selection //normal selection
optionName = arg.options[choiceIndex]; optionName = arg.options[choiceIndex];
} else { } else {

View File

@ -16,7 +16,7 @@ ModemBase *ModemFSK::factory() {
return new ModemFSK; return new ModemFSK;
} }
int ModemFSK::checkSampleRate(long long sampleRate, int audioSampleRate) { int ModemFSK::checkSampleRate(long long sampleRate, int /* audioSampleRate */) {
double minSps = pow(2.0,bps); double minSps = pow(2.0,bps);
double nextSps = (double(sampleRate) / double(sps)); double nextSps = (double(sampleRate) / double(sps));
if (nextSps < minSps) { if (nextSps < minSps) {

View File

@ -286,7 +286,7 @@ void SpectrumVisualProcessor::process() {
return; return;
} }
while (resampleBw / SPECTRUM_VZM >= bandwidth) { while (resampleBw / SPECTRUM_VZM >= (long) bandwidth) {
resampleBw /= SPECTRUM_VZM; resampleBw /= SPECTRUM_VZM;
} }