diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index f31227ad4..4b62a502a 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -478,10 +478,10 @@ typedef void (*_gnome_interaction_key_return_fn)(gint, gboolean); static _gnome_client_request_interaction_fn gnome_client_request_interaction; static _gnome_interaction_key_return_fn gnome_interaction_key_return; -static void interact_cb(GnomeClient *client, +static void interact_cb(GnomeClient * /* client */, gint key, - GnomeDialogType type, - gpointer data) + GnomeDialogType /* type */, + gpointer /* data */) { wxCloseEvent e(wxEVT_QUERY_END_SESSION, wxID_ANY); e.SetEventObject(&wxGetApp()); @@ -493,12 +493,12 @@ static void interact_cb(GnomeClient *client, } static gboolean save_yourself_cb(GnomeClient *client, - gint phase, - GnomeSaveStyle style, + gint /* phase */, + GnomeSaveStyle /* style */, gboolean shutdown, GnomeInteractStyle interact, - gboolean fast, - gpointer user_data) + gboolean /* fast */, + gpointer /* user_data */) { if (!shutdown || interact != GNOME_INTERACT_ANY) { return TRUE; @@ -888,7 +888,7 @@ void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event)) if (ShouldShowMissingAliasedFileWarning()) { // find which project owns the blockfile // note: there may be more than 1, but just go with the first one. - size_t numProjects = gAudacityProjects.size(); + //size_t numProjects = gAudacityProjects.size(); AudacityProject *offendingProject {}; wxString missingFileName; @@ -1110,6 +1110,7 @@ void AudacityApp::GenerateCrashReport(wxDebugReport::Context ctx) int AudacityApp::FilterEvent(wxEvent & event) { + (void)event;// compiler food (stops unused parameter warning) #if !wxCHECK_VERSION(3, 0, 0) && defined(__WXGTK__) // On wxGTK, there's a focus issue where dialogs do not automatically pass focus // to the first child. This means that you can use the keyboard to navigate within @@ -1844,7 +1845,7 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir) } #if defined(__UNIX__) -void AudacityApp::OnServerEvent(wxSocketEvent & evt) +void AudacityApp::OnServerEvent(wxSocketEvent & /* evt */) { wxSocketBase *sock; @@ -2061,7 +2062,7 @@ int AudacityApp::OnExit() // and skip the event unless none are open (which should only happen // on the Mac, at least currently.) -void AudacityApp::OnMenuAbout(wxCommandEvent & event) +void AudacityApp::OnMenuAbout(wxCommandEvent & /*event*/) { // This function shadows a similar function // in Menus.cpp, but should only be used on the Mac platform. diff --git a/src/Diags.cpp b/src/Diags.cpp index 67860466f..0f770b47a 100644 --- a/src/Diags.cpp +++ b/src/Diags.cpp @@ -42,6 +42,7 @@ static bool bStopWatchStarted = false; void diagnostics_do_diag( t_diag_struct * pDiag ){ wxLog * pLog = wxLog::SetActiveTarget(NULL); + // this macro is empty if wxWidgets is not compiled in debug mode wxLogDebug( wxT("%s"), pDiag->pMessage ); wxLog::SetActiveTarget(pLog); } diff --git a/src/LabelDialog.cpp b/src/LabelDialog.cpp index 2ac4ae92a..67b9531c9 100644 --- a/src/LabelDialog.cpp +++ b/src/LabelDialog.cpp @@ -562,7 +562,7 @@ void LabelDialog::OnRemove(wxCommandEvent & WXUNUSED(event)) } // Remove the row - RowData &rd = mData[row]; + //RowData &rd = mData[row]; mData.erase(mData.begin() + row); // Repopulate the grid diff --git a/src/Menus.cpp b/src/Menus.cpp index bb1e2094e..8f64e7b2e 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -1909,7 +1909,7 @@ void AudacityProject::ModifyToolbarMenus() // checkActive is a temporary hack that should be removed as soon as we // get multiple effect preview working -void AudacityProject::UpdateMenus(bool checkActive) +void AudacityProject::UpdateMenus(bool /*checkActive*/) { //ANSWER-ME: Why UpdateMenus only does active project? //JKC: Is this test fixing a bug when multiple projects are open? diff --git a/src/Project.cpp b/src/Project.cpp index 3478ab029..72dd082be 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -1652,7 +1652,7 @@ void AudacityProject::OnScrollRight() /// /// This handles the event when the left direction button on the scrollbar is depresssed /// -void AudacityProject::OnScrollLeftButton(wxScrollEvent & event) +void AudacityProject::OnScrollLeftButton(wxScrollEvent & /*event*/) { wxInt64 pos = mHsbar->GetThumbPosition(); // move at least one scroll increment @@ -1671,7 +1671,7 @@ void AudacityProject::OnScrollLeftButton(wxScrollEvent & event) /// /// This handles the event when the right direction button on the scrollbar is depresssed /// -void AudacityProject::OnScrollRightButton(wxScrollEvent & event) +void AudacityProject::OnScrollRightButton(wxScrollEvent & /*event*/) { wxInt64 pos = mHsbar->GetThumbPosition(); // move at least one scroll increment @@ -2276,6 +2276,7 @@ void AudacityProject::OnUpdateUI(wxUpdateUIEvent & WXUNUSED(event)) void AudacityProject::MacShowUndockedToolbars(bool show) { + (void)show;//compiler food #ifdef __WXMAC__ // Find all the floating toolbars, and show or hide them const auto &children = GetChildren(); diff --git a/src/Tags.h b/src/Tags.h index dd7d029dc..c02bc4f0b 100644 --- a/src/Tags.h +++ b/src/Tags.h @@ -142,7 +142,7 @@ class TagsEditor final : public wxDialogWrapper virtual ~TagsEditor(); - bool IsEscapeKey(const wxKeyEvent& event) override { return false; } + bool IsEscapeKey(const wxKeyEvent& /*event*/) override { return false; } void PopulateOrExchange(ShuttleGui & S); diff --git a/src/blockfile/SimpleBlockFile.cpp b/src/blockfile/SimpleBlockFile.cpp index fcfb8be56..894c71959 100644 --- a/src/blockfile/SimpleBlockFile.cpp +++ b/src/blockfile/SimpleBlockFile.cpp @@ -606,7 +606,7 @@ auto SimpleBlockFile::GetSpaceUsage() const -> DiskByteCount void SimpleBlockFile::Recover(){ wxFFile file(mFileName.GetFullPath(), wxT("wb")); - int i; + //int i; if( !file.IsOpened() ){ // Can't do anything else. diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 36653f32d..81a455b9b 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -105,6 +105,7 @@ void CommandImplementation::TypeCheck(const wxString &typeName, const wxString ¶mName, const wxVariant ¶m) { + // this macro is empty if wxWidgets is not compiled in debug mode wxASSERT_MSG(param.IsType(typeName), GetName() + wxT("command tried to get '") @@ -116,6 +117,7 @@ void CommandImplementation::TypeCheck(const wxString &typeName, void CommandImplementation::CheckParam(const wxString ¶mName) { + // this macro is empty if wxWidgets is not compiled in debug mode wxASSERT_MSG(mParams.find(paramName) != mParams.end(), GetName() + wxT("command tried to get '") diff --git a/src/commands/Keyboard.cpp b/src/commands/Keyboard.cpp index 6b052bd0e..2fe1f7c97 100644 --- a/src/commands/Keyboard.cpp +++ b/src/commands/Keyboard.cpp @@ -43,12 +43,13 @@ wxString KeyStringNormalize(const wxString & key) #endif } -wxString KeyStringDisplay(const wxString & key, bool useSspecialChars) +wxString KeyStringDisplay(const wxString & key, bool usesSpecialChars) { + (void)usesSpecialChars;//compiler food wxString newkey = KeyStringNormalize(key); #if defined(__WXMAC__) - if (!useSspecialChars) { + if (!usesSpecialChars) { // Compose user-visible keystroke names, all ASCII newkey.Replace(wxT("XCtrl+"), wxT("Control+")); newkey.Replace(wxT("Alt+"), wxT("Option+")); diff --git a/src/effects/BassTreble.cpp b/src/effects/BassTreble.cpp index 543882173..b65b3eff2 100644 --- a/src/effects/BassTreble.cpp +++ b/src/effects/BassTreble.cpp @@ -488,7 +488,7 @@ void EffectBassTreble::OnGainSlider(wxCommandEvent & evt) EnableApply(mUIParent->Validate()); } -void EffectBassTreble::OnLinkCheckbox(wxCommandEvent& evt) +void EffectBassTreble::OnLinkCheckbox(wxCommandEvent& /*evt*/) { mLink = mLinkCheckBox->GetValue(); } diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index e0079fd60..f7312b1c6 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -542,7 +542,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event)) f.Close(); } -void ContrastDialog::OnReset(wxCommandEvent & event) +void ContrastDialog::OnReset(wxCommandEvent & /*event*/) { mForegroundStartT->SetValue(0.0); mForegroundEndT->SetValue(0.0); diff --git a/src/effects/Distortion.cpp b/src/effects/Distortion.cpp index 3f7d12df4..03bf49cff 100644 --- a/src/effects/Distortion.cpp +++ b/src/effects/Distortion.cpp @@ -578,21 +578,21 @@ sampleCount EffectDistortion::InstanceProcess(EffectDistortionState& data, float return blockLen; } -void EffectDistortion::OnTypeChoice(wxCommandEvent& evt) +void EffectDistortion::OnTypeChoice(wxCommandEvent& /*evt*/) { mTypeChoiceCtrl->GetValidator()->TransferFromWindow(); UpdateUI(); } -void EffectDistortion::OnDCBlockCheckbox(wxCommandEvent& evt) +void EffectDistortion::OnDCBlockCheckbox(wxCommandEvent& /*evt*/) { mParams.mDCBlock = mDCBlockCheckBox->GetValue(); mbSavedFilterState = mParams.mDCBlock; } -void EffectDistortion::OnThresholdText(wxCommandEvent& evt) +void EffectDistortion::OnThresholdText(wxCommandEvent& /*evt*/) { mThresholdT->GetValidator()->TransferFromWindow(); mThreshold = DB_TO_LINEAR(mParams.mThreshold_dB); @@ -607,7 +607,7 @@ void EffectDistortion::OnThresholdSlider(wxCommandEvent& evt) mThresholdT->GetValidator()->TransferToWindow(); } -void EffectDistortion::OnNoiseFloorText(wxCommandEvent& evt) +void EffectDistortion::OnNoiseFloorText(wxCommandEvent& /*evt*/) { mNoiseFloorT->GetValidator()->TransferFromWindow(); mNoiseFloorS->SetValue((int) floor(mParams.mNoiseFloor + 0.5)); @@ -620,7 +620,7 @@ void EffectDistortion::OnNoiseFloorSlider(wxCommandEvent& evt) } -void EffectDistortion::OnParam1Text(wxCommandEvent& evt) +void EffectDistortion::OnParam1Text(wxCommandEvent& /*evt*/) { mParam1T->GetValidator()->TransferFromWindow(); mParam1S->SetValue((int) floor(mParams.mParam1 + 0.5)); @@ -632,7 +632,7 @@ void EffectDistortion::OnParam1Slider(wxCommandEvent& evt) mParam1T->GetValidator()->TransferToWindow(); } -void EffectDistortion::OnParam2Text(wxCommandEvent& evt) +void EffectDistortion::OnParam2Text(wxCommandEvent& /*evt*/) { mParam2T->GetValidator()->TransferFromWindow(); mParam2S->SetValue((int) floor(mParams.mParam2 + 0.5)); @@ -644,7 +644,7 @@ void EffectDistortion::OnParam2Slider(wxCommandEvent& evt) mParam2T->GetValidator()->TransferToWindow(); } -void EffectDistortion::OnRepeatsText(wxCommandEvent& evt) +void EffectDistortion::OnRepeatsText(wxCommandEvent& /*evt*/) { mRepeatsT->GetValidator()->TransferFromWindow(); mRepeatsS->SetValue(mParams.mRepeats); diff --git a/src/effects/FindClipping.cpp b/src/effects/FindClipping.cpp index 8975b9916..4e56b48c0 100644 --- a/src/effects/FindClipping.cpp +++ b/src/effects/FindClipping.cpp @@ -96,7 +96,7 @@ bool EffectFindClipping::Process() { std::shared_ptr addedTrack; Maybe modifiedTrack; - Track *original = NULL; + //Track *original = NULL; const wxString name{ _("Clipping") }; LabelTrack *lt = NULL; diff --git a/src/effects/ladspa/LadspaEffect.cpp b/src/effects/ladspa/LadspaEffect.cpp index 21a5f69b4..f45cf234f 100644 --- a/src/effects/ladspa/LadspaEffect.cpp +++ b/src/effects/ladspa/LadspaEffect.cpp @@ -1411,7 +1411,7 @@ bool LadspaEffect::PopulateUI(wxWindow *parent) item = safenew wxStaticText(w, 0, labelText + wxT(":")); gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5); - LADSPA_PortRangeHint hint = mData->PortRangeHints[p]; + //LADSPA_PortRangeHint hint = mData->PortRangeHints[p]; wxString bound; float lower = 0.0; diff --git a/src/export/ExportFFmpeg.cpp b/src/export/ExportFFmpeg.cpp index 23ae5d3e7..0ce67c017 100644 --- a/src/export/ExportFFmpeg.cpp +++ b/src/export/ExportFFmpeg.cpp @@ -651,7 +651,7 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam bool ExportFFmpeg::Finalize() { - int i, nEncodedBytes; + int nEncodedBytes; // Flush the audio FIFO and encoder. for (;;) diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index b0afc1f3d..7bf3b7e0b 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -519,7 +519,7 @@ void ExportMP3Options::OnQuality(wxCommandEvent& WXUNUSED(event)) } } -void ExportMP3Options::OnMono(wxCommandEvent& evt) +void ExportMP3Options::OnMono(wxCommandEvent& /*evt*/) { bool mono = false; mono = mMono->GetValue(); diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp index d15233d54..82b69a51b 100644 --- a/src/export/ExportPCM.cpp +++ b/src/export/ExportPCM.cpp @@ -414,7 +414,7 @@ int ExportPCM::Export(AudacityProject *project, wxString formatStr; SF_INFO info; - int err; + //int err; //This whole operation should not occur while a file is being loaded on OD, //(we are worried about reading from a file being written to,) so we block. diff --git a/src/prefs/RecordingPrefs.cpp b/src/prefs/RecordingPrefs.cpp index 7c48120c5..18f280181 100644 --- a/src/prefs/RecordingPrefs.cpp +++ b/src/prefs/RecordingPrefs.cpp @@ -244,7 +244,7 @@ bool RecordingPrefs::Apply() return true; } -void RecordingPrefs::OnToggleCustomName(wxCommandEvent & Evt) +void RecordingPrefs::OnToggleCustomName(wxCommandEvent & /* Evt */) { mUseCustomTrackName = !mUseCustomTrackName; mToggleCustomName->Enable(mUseCustomTrackName); diff --git a/src/prefs/RecordingPrefs.h b/src/prefs/RecordingPrefs.h index a65e7dc8b..58e3fb030 100644 --- a/src/prefs/RecordingPrefs.h +++ b/src/prefs/RecordingPrefs.h @@ -31,7 +31,7 @@ class RecordingPrefs final : public PrefsPanel private: void Populate(); void PopulateOrExchange(ShuttleGui & S); - void OnToggleCustomName(wxCommandEvent & Evt); + void OnToggleCustomName(wxCommandEvent & /* Evt */); wxTextCtrl *mToggleCustomName; bool mUseCustomTrackName; diff --git a/src/toolbars/ControlToolBar.cpp b/src/toolbars/ControlToolBar.cpp index 853622785..e052a7333 100644 --- a/src/toolbars/ControlToolBar.cpp +++ b/src/toolbars/ControlToolBar.cpp @@ -444,7 +444,7 @@ void ControlToolBar::EnableDisableButtons() mRewind->SetEnabled(!playing && !recording); mFF->SetEnabled(tracks && !playing && !recording); - auto pProject = GetActiveProject(); + //auto pProject = GetActiveProject(); mPause->SetEnabled(CanStopAudioStream()); } diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 632f5110b..f41442a3e 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -385,7 +385,7 @@ bool Scrubber::MaybeStartScrubbing(wxCoord xx) // ? ControlToolBar::PlayAppearance::Seek // : ControlToolBar::PlayAppearance::Scrub; ControlToolBar::PlayAppearance::Straight; - const bool cutPreview = false; +// const bool cutPreview = false; const bool backwards = time1 < time0; #ifdef EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL static const double maxScrubSpeedBase = @@ -686,7 +686,7 @@ void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event) void Scrubber::Forwarder::OnMouse(wxMouseEvent &event) { - auto ruler = scrubber.mProject->GetRulerPanel(); + //auto ruler = scrubber.mProject->GetRulerPanel(); auto isScrubbing = scrubber.IsScrubbing(); if (isScrubbing && !event.HasAnyModifiers()) { if(event.LeftDown() && scrubber.MayDragToSeek()) { diff --git a/src/widgets/NumericTextCtrl.cpp b/src/widgets/NumericTextCtrl.cpp index fb8f9811e..ea3408684 100644 --- a/src/widgets/NumericTextCtrl.cpp +++ b/src/widgets/NumericTextCtrl.cpp @@ -1750,7 +1750,7 @@ void NumericTextCtrl::OnKeyDown(wxKeyEvent &event) } } -void NumericTextCtrl::SetFieldFocus(int digit) +void NumericTextCtrl::SetFieldFocus(int digit) { #if wxUSE_ACCESSIBILITY if (mDigits.GetCount() == 0) diff --git a/src/widgets/NumericTextCtrl.h b/src/widgets/NumericTextCtrl.h index 7f51cf071..d638e7500 100644 --- a/src/widgets/NumericTextCtrl.h +++ b/src/widgets/NumericTextCtrl.h @@ -164,7 +164,7 @@ class NumericTextCtrl final : public wxControl, public NumericConverter void SetFormatString(const wxString & formatString); void SetFormatName(const wxString & formatName); - void SetFieldFocus(int digit); + void SetFieldFocus(int /* digit */); void SetReadOnly(bool readOnly = true); void EnableMenu(bool enable = true); diff --git a/src/widgets/ProgressDialog.cpp b/src/widgets/ProgressDialog.cpp index 369068bbb..d59268ef3 100644 --- a/src/widgets/ProgressDialog.cpp +++ b/src/widgets/ProgressDialog.cpp @@ -1076,7 +1076,7 @@ bool ProgressDialog::Create(const wxString & title, // Set this boolean to indicate if we are using the "Elapsed" labels m_bShowElapsedTime = !(flags & pdlgHideElapsedTime); // Set this boolean to indicate if we confirm the Cancel/Stop actions - m_bConfirmAction = (flags & pdlgConfirmStopCancel); + m_bConfirmAction = (flags & pdlgConfirmStopCancel)!=0; bool success = wxDialogWrapper::Create(parent, wxID_ANY, diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 87282ed34..9e79a49bd 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1778,14 +1778,14 @@ AdornedRulerPanel *QuickPlayRulerOverlay::GetRuler() const return mPartner.mProject->GetRulerPanel(); } -std::pair QuickPlayRulerOverlay::DoGetRectangle(wxSize size) +std::pair QuickPlayRulerOverlay::DoGetRectangle(wxSize /*size*/) { const auto x = mOldQPIndicatorPos; if (x >= 0) { // These dimensions are always sufficient, even if a little // excessive for the small triangle: const int width = IndicatorBigWidth() * 3 / 2; - const auto height = IndicatorHeightForWidth(width); + //const auto height = IndicatorHeightForWidth(width); const int indsize = width / 2; @@ -1802,7 +1802,7 @@ std::pair QuickPlayRulerOverlay::DoGetRectangle(wxSize size) return { {}, mNewQPIndicatorPos >= 0 }; } -void QuickPlayRulerOverlay::Draw(OverlayPanel &panel, wxDC &dc) +void QuickPlayRulerOverlay::Draw(OverlayPanel & /*panel*/, wxDC &dc) { mOldQPIndicatorPos = mNewQPIndicatorPos; if (mOldQPIndicatorPos >= 0) { @@ -2108,7 +2108,7 @@ void AdornedRulerPanel::InvalidateRuler() } namespace { - const wxString StartScrubbingMessage(const Scrubber &scrubber) + const wxString StartScrubbingMessage(const Scrubber &/*scrubber*/) { /* i18n-hint: These commands assist the user in finding a sound by ear. ... "Scrubbing" is variable-speed playback, ... @@ -2571,7 +2571,7 @@ void AdornedRulerPanel::HandleQPClick(wxMouseEvent &evt, wxCoord mousePosX) CaptureMouse(); } -void AdornedRulerPanel::HandleQPDrag(wxMouseEvent &event, wxCoord mousePosX) +void AdornedRulerPanel::HandleQPDrag(wxMouseEvent &/*event*/, wxCoord mousePosX) { bool isWithinClick = (mLeftDownClick >= 0) && IsWithinMarker(mousePosX, mLeftDownClick); bool isWithinStart = IsWithinMarker(mousePosX, mOldPlayRegionStart); @@ -2876,7 +2876,7 @@ void AdornedRulerPanel::UpdateButtonStates() } } -void AdornedRulerPanel::OnTogglePinnedState(wxCommandEvent & event) +void AdornedRulerPanel::OnTogglePinnedState(wxCommandEvent & /*event*/) { mProject->OnTogglePinnedHead(); UpdateButtonStates();