Cleanup unused var warnings

Clean up compiling output so that actual issues can be spotted. Remove multiple
cases of unused parameter. Remove unused isActive at startup. (demod is started
regardless)
This commit is contained in:
Stanisław Pitucha 2016-01-27 11:20:14 +11:00
parent a9e88256e4
commit c59f72d4a0
8 changed files with 22 additions and 34 deletions

View File

@ -1458,13 +1458,9 @@ bool AppFrame::loadSession(std::string fileName) {
}
}
bool isActive = false;
newDemod = wxGetApp().getDemodMgr().newThread();
if (demod->hasAnother("active")) {
isActive = true; // active only written to active demod, no need to parse..
loadedDemod = newDemod;
}

View File

@ -211,23 +211,15 @@ private:
#endif
};
static const wxCmdLineEntryDesc commandLineInfo [] =
{
{ wxCMD_LINE_SWITCH, "h", "help", "Command line parameter help", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_OPTION, "c", "config", "Specify a named configuration to use, i.e. '-c ham'", wxCMD_LINE_VAL_STRING, 0 },
{ wxCMD_LINE_OPTION, "m", "modpath", "Load modules from suppplied path, i.e. '-m ~/SoapyMods/'", wxCMD_LINE_VAL_STRING, 0 },
#ifdef BUNDLE_SOAPY_MODS
static const wxCmdLineEntryDesc commandLineInfo [] =
{
{ wxCMD_LINE_SWITCH, "h", "help", "Command line parameter help", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_OPTION, "c", "config", "Specify a named configuration to use, i.e. '-c ham'" },
{ wxCMD_LINE_OPTION, "m", "modpath", "Load modules from suppplied path, i.e. '-m ~/SoapyMods/'" },
{ wxCMD_LINE_SWITCH, "b", "bundled", "Use bundled SoapySDR modules first instead of local." },
{ wxCMD_LINE_NONE }
};
#else
static const wxCmdLineEntryDesc commandLineInfo [] =
{
{ wxCMD_LINE_SWITCH, "h", "help", "Command line parameter help", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_OPTION, "c", "config", "Specify a named configuration to use, i.e. '-c ham'" },
{ wxCMD_LINE_OPTION, "m", "modpath", "Load modules from suppplied path, i.e. '-m ~/SoapyMods/'" },
{ wxCMD_LINE_NONE }
};
{ wxCMD_LINE_SWITCH, "b", "bundled", "Use bundled SoapySDR modules first instead of local.", wxCMD_LINE_VAL_NONE, 0 },
#endif
{ wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 }
};
DECLARE_APP(CubicSDR)

View File

@ -21,7 +21,7 @@ ModemProperties::ModemProperties(wxWindow *parent, wxWindowID winid,
mouseInView = false;
}
void ModemProperties::OnShow(wxShowEvent &event) {
void ModemProperties::OnShow(wxShowEvent & /* event */) {
}
ModemProperties::~ModemProperties() {
@ -166,11 +166,11 @@ void ModemProperties::OnChange(wxPropertyGridEvent &event) {
}
}
void ModemProperties::OnMouseEnter(wxMouseEvent &event) {
void ModemProperties::OnMouseEnter(wxMouseEvent & /* event */) {
mouseInView = true;
}
void ModemProperties::OnMouseLeave(wxMouseEvent &event) {
void ModemProperties::OnMouseLeave(wxMouseEvent & /* event */) {
mouseInView = false;
}

View File

@ -467,4 +467,4 @@ void DemodulatorInstance::closeOutput() {
activeOutput->Close();
}
}
#endif
#endif

View File

@ -19,7 +19,7 @@ SDRDevicesDialog::SDRDevicesDialog( wxWindow* parent ): devFrame( parent ) {
dev = nullptr;
}
void SDRDevicesDialog::OnClose( wxCloseEvent& event ) {
void SDRDevicesDialog::OnClose( wxCloseEvent& /* event */) {
wxGetApp().setDeviceSelectorClosed();
Destroy();
}
@ -173,7 +173,7 @@ void SDRDevicesDialog::OnSelectionChanged( wxTreeEvent& event ) {
event.Skip();
}
void SDRDevicesDialog::OnAddRemote( wxMouseEvent& event ) {
void SDRDevicesDialog::OnAddRemote( wxMouseEvent& /* event */) {
if (removeId != nullptr) {
SDRDeviceInfo *selDev = getSelectedDevice(removeId);
@ -233,7 +233,7 @@ SDRDeviceInfo *SDRDevicesDialog::getSelectedDevice(wxTreeItemId selId) {
return NULL;
}
void SDRDevicesDialog::OnUseSelected( wxMouseEvent& event ) {
void SDRDevicesDialog::OnUseSelected( wxMouseEvent& /* event */) {
if (dev != NULL) {
int i = 0;
SoapySDR::ArgInfoList::const_iterator args_i;
@ -376,7 +376,7 @@ void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
}
}
void SDRDevicesDialog::OnRefreshDevices( wxMouseEvent& event ) {
void SDRDevicesDialog::OnRefreshDevices( wxMouseEvent& /* event */) {
doRefreshDevices();
}
@ -407,7 +407,7 @@ void SDRDevicesDialog::OnPropGridChanged( wxPropertyGridEvent& event ) {
}
}
void SDRDevicesDialog::OnPropGridFocus( wxFocusEvent& event ) {
void SDRDevicesDialog::OnPropGridFocus( wxFocusEvent& /* event */) {
editId = selId;
}
@ -429,4 +429,4 @@ void SDRDevicesDialog::doRefreshDevices() {
dev = nullptr;
refresh = true;
m_addRemoteButton->SetLabel("Add");
}
}

View File

@ -72,11 +72,11 @@ int Modem::getDefaultSampleRate() {
return 200000;
}
void Modem::writeSetting(std::string setting, std::string value) {
void Modem::writeSetting(std::string /* setting */, std::string /* value */) {
// ...
}
std::string Modem::readSetting(std::string setting) {
std::string Modem::readSetting(std::string /* setting */) {
return "";
}

View File

@ -26,7 +26,7 @@ public:
}
SDRThreadIQData(long long bandwidth, long long frequency, std::vector<signed char> *data) :
SDRThreadIQData(long long bandwidth, long long frequency, std::vector<signed char> * /* data */) :
frequency(frequency), sampleRate(bandwidth) {
}

View File

@ -349,7 +349,7 @@ void PrimaryGLContext::DrawDemod(DemodulatorInstance *demod, RGBA4f color, long
}
void PrimaryGLContext::DrawFreqSelector(float uxPos, RGBA4f color, float w, long long center_freq, long long srate) {
void PrimaryGLContext::DrawFreqSelector(float uxPos, RGBA4f color, float w, long long /* center_freq */, long long srate) {
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
long long bw = 0;