Skip to content

Commit

Permalink
Additional warning fixes; run brew update before brew install for hamlib
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcliffe committed Jan 11, 2019
1 parent e75387c commit c57a123
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ addons:
- freeglut3-dev
- libhamlib-dev
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install hamlib; fi
- bash travis-ci/build_liquiddsp.sh
- bash travis-ci/build_soapysdr.sh
Expand Down
8 changes: 6 additions & 2 deletions src/AppFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,9 @@ bool AppFrame::actionOnMenuAbout(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]);

Expand Down Expand Up @@ -1720,7 +1722,9 @@ bool AppFrame::actionOnMenuRig(wxCommandEvent& event) {
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;
rigSerialRate = rigSerialRates[serialIdx];
resetRig = true;
Expand Down
5 changes: 3 additions & 2 deletions src/forms/SDRDevices/SDRDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,9 @@ std::string SDRDevicesDialog::getSelectedChoiceOption(wxPGProperty* prop, const
int choiceIndex = prop->GetChoiceSelection();

if (arg.options.size() > 0) {

if (choiceIndex >= 0 && choiceIndex < arg.options.size()) {
int choiceMax = arg.options.size();

if (choiceIndex >= 0 && choiceIndex < choiceMax) {
//normal selection
optionName = arg.options[choiceIndex];
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/modem/digital/ModemFSK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ModemBase *ModemFSK::factory() {
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 nextSps = (double(sampleRate) / double(sps));
if (nextSps < minSps) {
Expand Down
2 changes: 1 addition & 1 deletion src/process/SpectrumVisualProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void SpectrumVisualProcessor::process() {
return;
}

while (resampleBw / SPECTRUM_VZM >= bandwidth) {
while (resampleBw / SPECTRUM_VZM >= (long) bandwidth) {
resampleBw /= SPECTRUM_VZM;
}

Expand Down

0 comments on commit c57a123

Please sign in to comment.