Merge pull request #265 from viraptor/unused_cleanup

Cleanup unused var warnings
This commit is contained in:
Charles J. Cliffe 2016-01-26 21:54:05 -05:00
commit a364ffec6e
13 changed files with 31 additions and 43 deletions

View File

@ -42,7 +42,7 @@ namespace CubicVR {
return mat4(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f);
}
static mat4 multiply(mat4 mLeft, mat4 mRight, bool updated) {
static mat4 multiply(mat4 mLeft, mat4 mRight, bool /* updated */) {
mat4 mOut;
mOut[0] = mLeft[0] * mRight[0] + mLeft[4] * mRight[1] + mLeft[8] * mRight[2] + mLeft[12] * mRight[3];
@ -65,7 +65,7 @@ namespace CubicVR {
return mOut;
};
static vec3 multiply(mat4 m1, vec3 m2, bool updated) {
static vec3 multiply(mat4 m1, vec3 m2, bool /* updated */) {
vec3 mOut;
mOut[0] = m1[0] * m2[0] + m1[4] * m2[1] + m1[8] * m2[2] + m1[12];
@ -312,7 +312,7 @@ namespace CubicVR {
return mat4::translate(-eyex,-eyey,-eyez) * mat4( side[0], up[0], -forward[0], 0, side[1], up[1], -forward[1], 0, side[2], up[2], -forward[2], 0, 0, 0, 0, 1);
};
static vec3 unProject(mat4 pMatrix, mat4 mvMatrix, float width, float height, float winx, float winy, float winz) {
static vec3 unProject(mat4 pMatrix, mat4 mvMatrix, float width, float height, float winx, float winy, float /* winz */) {
vec4 p(((winx / width) * 2.0) - 1.0, -(((winy / height) * 2.0) - 1.0), 1.0, 1.0);
vec4 invp = mat4::vec4_multiply(mat4::vec4_multiply(p, mat4::inverse(pMatrix)), mat4::inverse(mvMatrix));

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

@ -49,7 +49,7 @@ void AudioThread::deviceCleanup() {
}
}
static int audioCallback(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, double streamTime, RtAudioStreamStatus status,
static int audioCallback(void *outputBuffer, void * /* inputBuffer */, unsigned int nBufferFrames, double /* streamTime */, RtAudioStreamStatus status,
void *userData) {
AudioThread *src = (AudioThread *) userData;
float *out = (float*) outputBuffer;

View File

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

View File

@ -21,7 +21,7 @@ SDRDeviceAddDialog::SDRDeviceAddDialog( wxWindow* parent ): SDRDeviceAddForm( pa
}
}
void SDRDeviceAddDialog::OnSoapyModuleChanged( wxCommandEvent& event ) {
void SDRDeviceAddDialog::OnSoapyModuleChanged( wxCommandEvent& /* event */) {
wxString strSel = m_soapyModule->GetStringSelection();
selectedModule = strSel.ToStdString();
@ -33,12 +33,12 @@ void SDRDeviceAddDialog::OnSoapyModuleChanged( wxCommandEvent& event ) {
}
}
void SDRDeviceAddDialog::OnCancelButton( wxCommandEvent& event ) {
void SDRDeviceAddDialog::OnCancelButton( wxCommandEvent& /* event */) {
okPressed = false;
Close(true);
}
void SDRDeviceAddDialog::OnOkButton( wxCommandEvent& event ) {
void SDRDeviceAddDialog::OnOkButton( wxCommandEvent& /* event */) {
wxString strSel = m_soapyModule->GetStringSelection();
selectedModule = strSel.ToStdString();
moduleParam = m_paramText->GetValue().ToStdString();

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

@ -52,7 +52,7 @@ void UITestCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
SwapBuffers();
}
void UITestCanvas::OnIdle(wxIdleEvent &event) {
void UITestCanvas::OnIdle(wxIdleEvent& /* event */) {
Refresh(false);
}

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;

View File

@ -240,7 +240,7 @@ void ScopeCanvas::OnMouseMoved(wxMouseEvent& event) {
}
}
void ScopeCanvas::OnMouseWheelMoved(wxMouseEvent& event) {
void ScopeCanvas::OnMouseWheelMoved(wxMouseEvent& /* event */) {
}