From 9c77e0b2a5deb2562826de6981381a2c26a0c8b3 Mon Sep 17 00:00:00 2001 From: Pavel Pimenov Date: Fri, 21 Dec 2018 19:23:07 +0300 Subject: [PATCH] Remove unused variables This fixes PVS Studio static analyzer warnings: V808 'errMsg' object of 'wxString' type was created but was not utilized. docview.cpp 1182 V808 'search' object of 'wxString' type was created but was not utilized. dirctrlg.cpp 697 V808 'filename' object of 'wxString' type was created but was not utilized. dirctrlg.cpp 697 (see full report at http://www.fly-server.ru/pvs-studio/wxWidgets-core/) Closes https://github.com/wxWidgets/wxWidgets/pull/1096 --- src/common/docview.cpp | 1 - src/generic/dirctrlg.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index c41b1f60ee..9c7b8d1c53 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1179,7 +1179,6 @@ void wxDocManager::DoOpenMRUFile(unsigned n) if ( filename.empty() ) return; - wxString errMsg; // must contain exactly one "%s" if non-empty if ( wxFile::Exists(filename) ) { // Try to open it but don't give an error if it failed: this could be diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 84ceb8b97d..cd5a1970c6 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -694,7 +694,7 @@ void wxGenericDirCtrl::PopulateNode(wxTreeItemId parentId) wxASSERT(data); - wxString search,path,filename; + wxString path; wxString dirName(data->m_path);