Fix some warnings detected by PVS-STUDIO (most are not used vars)

This commit is contained in:
jean-pierre charras 2022-07-25 13:07:57 +02:00
parent 032708860b
commit 993c446fdf
34 changed files with 5 additions and 65 deletions

View File

@ -1051,7 +1051,7 @@ void RENDER_3D_OPENGL::freeAllLists()
m_triangles.clear(); m_triangles.clear();
for( const std::pair<const wxString&, MODEL_3D*>& entry : m_3dModelMap ) for( const std::pair<const wxString, MODEL_3D*>& entry : m_3dModelMap )
delete entry.second; delete entry.second;
m_3dModelMap.clear(); m_3dModelMap.clear();

View File

@ -423,7 +423,7 @@ void PARAM_CFG_WXSTRING_SET::SaveParam( wxConfigBase* aConfig ) const
for( const wxString& str : *m_Pt_param ) for( const wxString& str : *m_Pt_param )
{ {
wxString key, data; wxString key;
key = m_Ident; key = m_Ident;
key << i++; key << i++;

View File

@ -126,8 +126,6 @@ DIALOG_PAGES_SETTINGS::~DIALOG_PAGES_SETTINGS()
bool DIALOG_PAGES_SETTINGS::TransferDataToWindow() bool DIALOG_PAGES_SETTINGS::TransferDataToWindow()
{ {
wxString msg;
// initialize page format choice box and page format list. // initialize page format choice box and page format list.
// The first shows translated strings, the second contains not translated strings // The first shows translated strings, the second contains not translated strings
m_paperSizeComboBox->Clear(); m_paperSizeComboBox->Clear();

View File

@ -709,13 +709,9 @@ void EDA_BASE_FRAME::LoadWindowSettings( const WINDOW_SETTINGS* aCfg )
void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg ) void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg )
{ {
wxString text;
if( IsIconized() ) if( IsIconized() )
return; return;
wxString baseCfgName = ConfigBaseName();
// If the window is maximized, we use the saved window size from before it was maximized // If the window is maximized, we use the saved window size from before it was maximized
if( IsMaximized() ) if( IsMaximized() )
{ {

View File

@ -161,8 +161,6 @@ bool FILENAME_RESOLVER::createPathList()
if( !m_paths.empty() ) if( !m_paths.empty() )
return true; return true;
wxString kmod;
// add an entry for the default search path; at this point // add an entry for the default search path; at this point
// we cannot set a sensible default so we use an empty string. // we cannot set a sensible default so we use an empty string.
// the user may change this later with a call to SetProjectDir() // the user may change this later with a call to SetProjectDir()

View File

@ -373,7 +373,6 @@ void wordbreakMarkup( std::vector<std::pair<wxString, int>>* aWords,
} }
else else
{ {
wxString space( wxS( " " ) );
wxString textRun = aNode->asWxString(); wxString textRun = aNode->asWxString();
wxArrayString words; wxArrayString words;

View File

@ -317,7 +317,6 @@ bool GERBER_PLOTTER::StartPlot()
bool GERBER_PLOTTER::EndPlot() bool GERBER_PLOTTER::EndPlot()
{ {
char line[1024]; char line[1024];
wxString msg;
wxASSERT( m_outputFile ); wxASSERT( m_outputFile );

View File

@ -765,7 +765,6 @@ void PS_PLOTTER::PenTo( const VECTOR2I& pos, char plume )
bool PS_PLOTTER::StartPlot() bool PS_PLOTTER::StartPlot()
{ {
wxASSERT( m_outputFile ); wxASSERT( m_outputFile );
wxString msg;
static const char* PSMacro[] = static const char* PSMacro[] =
{ {

View File

@ -714,7 +714,6 @@ void SVG_PLOTTER::PenTo( const VECTOR2I& pos, char plume )
bool SVG_PLOTTER::StartPlot() bool SVG_PLOTTER::StartPlot()
{ {
wxASSERT( m_outputFile ); wxASSERT( m_outputFile );
wxString msg;
static const char* header[] = static const char* header[] =
{ {

View File

@ -455,7 +455,6 @@ bool NET_SETTINGS::ParseBusGroup( const wxString& aGroup, wxString* aName,
size_t groupLen = aGroup.length(); size_t groupLen = aGroup.length();
size_t i = 0; size_t i = 0;
wxString prefix; wxString prefix;
wxString suffix;
wxString tmp; wxString tmp;
int braceNesting = 0; int braceNesting = 0;

View File

@ -1120,8 +1120,6 @@ bool SETTINGS_MANAGER::BackupProject( REPORTER& aReporter ) const
target.SetName( fileName ); target.SetName( fileName );
target.SetExt( ArchiveFileExtension ); target.SetExt( ArchiveFileExtension );
wxDir dir( target.GetPath() );
if( !target.DirExists() && !wxMkdir( target.GetPath() ) ) if( !target.DirExists() && !wxMkdir( target.GetPath() ) )
{ {
wxLogTrace( traceSettings, wxT( "Could not create project backup path %s" ), target.GetPath() ); wxLogTrace( traceSettings, wxT( "Could not create project backup path %s" ), target.GetPath() );

View File

@ -823,8 +823,6 @@ bool TOOL_MANAGER::dispatchActivation( const TOOL_EVENT& aEvent )
if( aEvent.IsActivate() ) if( aEvent.IsActivate() )
{ {
wxString cmdStr( *aEvent.GetCommandStr() );
auto tool = m_toolNameIndex.find( *aEvent.GetCommandStr() ); auto tool = m_toolNameIndex.find( *aEvent.GetCommandStr() );
if( tool != m_toolNameIndex.end() ) if( tool != m_toolNameIndex.end() )

View File

@ -201,7 +201,6 @@ public:
wxString escapedNetName; wxString escapedNetName;
wxString remainingName; wxString remainingName;
int selection = m_listBox->GetSelection(); int selection = m_listBox->GetSelection();
wxString prefix = CREATE_NET;
if( selection >= 0 ) if( selection >= 0 )
selectedNetName = m_listBox->GetString( (unsigned) selection ); selectedNetName = m_listBox->GetString( (unsigned) selection );

View File

@ -188,14 +188,13 @@ void UNIT_BINDER::onKillFocus( wxFocusEvent& aEvent )
if( m_eval.Process( textEntry->GetValue() ) ) if( m_eval.Process( textEntry->GetValue() ) )
{ {
textEntry->GetSelection( &m_selStart, &m_selEnd ); textEntry->GetSelection( &m_selStart, &m_selEnd );
wxString sel = textEntry->GetStringSelection();
textEntry->ChangeValue( m_eval.Result() ); textEntry->ChangeValue( m_eval.Result() );
#ifdef __WXGTK__ #ifdef __WXGTK__
// Manually copy the selected text to the primary selection clipboard // Manually copy the selected text to the primary selection clipboard
if( wxTheClipboard->Open() ) if( wxTheClipboard->Open() )
{ {
wxString sel = textEntry->GetStringSelection();
bool clipTarget = wxTheClipboard->IsUsingPrimarySelection(); bool clipTarget = wxTheClipboard->IsUsingPrimarySelection();
wxTheClipboard->UsePrimarySelection( true ); wxTheClipboard->UsePrimarySelection( true );
wxTheClipboard->SetData( new wxTextDataObject( sel ) ); wxTheClipboard->SetData( new wxTextDataObject( sel ) );

View File

@ -2419,7 +2419,6 @@ bool CONNECTION_GRAPH::ercCheckBusToNetConflicts( const CONNECTION_SUBGRAPH* aSu
bool CONNECTION_GRAPH::ercCheckBusToBusConflicts( const CONNECTION_SUBGRAPH* aSubgraph ) bool CONNECTION_GRAPH::ercCheckBusToBusConflicts( const CONNECTION_SUBGRAPH* aSubgraph )
{ {
wxString msg;
const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet; const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet;
SCH_SCREEN* screen = sheet.LastScreen(); SCH_SCREEN* screen = sheet.LastScreen();
@ -2587,7 +2586,6 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH
bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph ) bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph )
{ {
ERC_SETTINGS& settings = m_schematic->ErcSettings(); ERC_SETTINGS& settings = m_schematic->ErcSettings();
wxString msg;
const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet; const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet;
SCH_SCREEN* screen = sheet.LastScreen(); SCH_SCREEN* screen = sheet.LastScreen();
bool ok = true; bool ok = true;

View File

@ -613,7 +613,6 @@ void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem; std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
wxString listName; wxString listName;
wxMenu menu; wxMenu menu;
wxString msg;
switch( settings.GetSeverity( rcItem->GetErrorCode() ) ) switch( settings.GetSeverity( rcItem->GetErrorCode() ) )
{ {

View File

@ -552,8 +552,6 @@ bool NETLIST_DIALOG::FilenamePrms( NETLIST_TYPE_ID aType, wxString * aExt, wxStr
void NETLIST_DIALOG::WriteCurrentNetlistSetup() void NETLIST_DIALOG::WriteCurrentNetlistSetup()
{ {
wxString msg;
NetlistUpdateOpt(); NetlistUpdateOpt();
EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ); EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );

View File

@ -183,7 +183,6 @@ bool DIALOG_SHEET_PROPERTIES::TransferDataToWindow()
bool DIALOG_SHEET_PROPERTIES::Validate() bool DIALOG_SHEET_PROPERTIES::Validate()
{ {
wxString msg;
LIB_ID id; LIB_ID id;
if( !m_grid->CommitPendingChanges() || !m_grid->Validate() ) if( !m_grid->CommitPendingChanges() || !m_grid->Validate() )

View File

@ -275,8 +275,6 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
} }
else else
{ {
wxString extendedMsg;
if( m_simCommand.IsEmpty() ) if( m_simCommand.IsEmpty() )
{ {
KIDIALOG dlg( this, _( "No valid simulation is configured." ), _( "Warning" ), KIDIALOG dlg( this, _( "No valid simulation is configured." ), _( "Warning" ),

View File

@ -578,7 +578,6 @@ void DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event )
bool DIALOG_SYMBOL_PROPERTIES::Validate() bool DIALOG_SYMBOL_PROPERTIES::Validate()
{ {
wxString msg;
LIB_ID id; LIB_ID id;
if( !m_fieldsGrid->CommitPendingChanges() || !m_fieldsGrid->Validate() ) if( !m_fieldsGrid->CommitPendingChanges() || !m_fieldsGrid->Validate() )
@ -635,8 +634,6 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
// the schematic file. // the schematic file.
currentScreen->Remove( m_symbol ); currentScreen->Remove( m_symbol );
wxString msg;
// save old cmp in undo list if not already in edit, or moving ... // save old cmp in undo list if not already in edit, or moving ...
if( m_symbol->GetEditFlags() == 0 ) if( m_symbol->GetEditFlags() == 0 )
GetParent()->SaveCopyInUndoList( currentScreen, m_symbol, UNDO_REDO::CHANGED, false ); GetParent()->SaveCopyInUndoList( currentScreen, m_symbol, UNDO_REDO::CHANGED, false );

View File

@ -339,7 +339,6 @@ int ERC_TESTER::TestMultiunitFootprints()
SCH_SHEET_LIST sheets = m_schematic->GetSheets(); SCH_SHEET_LIST sheets = m_schematic->GetSheets();
int errors = 0; int errors = 0;
std::map<wxString, LIB_ID> footprints;
SCH_MULTI_UNIT_REFERENCE_MAP refMap; SCH_MULTI_UNIT_REFERENCE_MAP refMap;
sheets.GetMultiUnitSymbols( refMap, true ); sheets.GetMultiUnitSymbols( refMap, true );
@ -589,7 +588,6 @@ int ERC_TESTER::TestMultUnitPinConflicts()
for( const std::pair<NET_NAME_CODE, std::vector<CONNECTION_SUBGRAPH*>> net : nets ) for( const std::pair<NET_NAME_CODE, std::vector<CONNECTION_SUBGRAPH*>> net : nets )
{ {
const wxString& netName = net.first.first; const wxString& netName = net.first.first;
std::vector<SCH_PIN*> pins;
for( CONNECTION_SUBGRAPH* subgraph : net.second ) for( CONNECTION_SUBGRAPH* subgraph : net.second )
{ {
@ -647,8 +645,6 @@ int ERC_TESTER::TestSimilarLabels()
for( const std::pair<NET_NAME_CODE, std::vector<CONNECTION_SUBGRAPH*>> net : nets ) for( const std::pair<NET_NAME_CODE, std::vector<CONNECTION_SUBGRAPH*>> net : nets )
{ {
std::vector<SCH_PIN*> pins;
for( CONNECTION_SUBGRAPH* subgraph : net.second ) for( CONNECTION_SUBGRAPH* subgraph : net.second )
{ {
for( EDA_ITEM* item : subgraph->m_items ) for( EDA_ITEM* item : subgraph->m_items )

View File

@ -1832,7 +1832,6 @@ void SCH_EDIT_FRAME::onSize( wxSizeEvent& aEvent )
void SCH_EDIT_FRAME::SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol, void SCH_EDIT_FRAME::SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol,
const KIID& aSchematicSymbolUUID ) const KIID& aSchematicSymbolUUID )
{ {
wxString msg;
bool appendToUndo = false; bool appendToUndo = false;
SCH_SHEET_PATH sheetPath; SCH_SHEET_PATH sheetPath;

View File

@ -736,7 +736,7 @@ void SCH_LINE::GetSelectedPoints( std::vector<VECTOR2I>& aPoints ) const
wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const wxString SCH_LINE::GetSelectMenuText( EDA_UNITS aUnits ) const
{ {
wxString txtfmt, orient; wxString txtfmt;
if( m_start.x == m_end.x ) if( m_start.x == m_end.x )
{ {

View File

@ -701,8 +701,6 @@ void SCH_SEXPR_PARSER::parsePinNames( std::unique_ptr<LIB_SYMBOL>& aSymbol )
wxCHECK_RET( CurTok() == T_pin_names, wxCHECK_RET( CurTok() == T_pin_names,
"Cannot parse " + GetTokenString( CurTok() ) + " as a pin_name token." ); "Cannot parse " + GetTokenString( CurTok() ) + " as a pin_name token." );
wxString error;
T token = NextTok(); T token = NextTok();
if( token == T_LEFT ) if( token == T_LEFT )
@ -736,7 +734,6 @@ LIB_FIELD* SCH_SEXPR_PARSER::parseProperty( std::unique_ptr<LIB_SYMBOL>& aSymbol
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a property." ) ); wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a property." ) );
wxCHECK( aSymbol, nullptr ); wxCHECK( aSymbol, nullptr );
wxString error;
wxString name; wxString name;
wxString value; wxString value;
std::unique_ptr<LIB_FIELD> field = std::make_unique<LIB_FIELD>( aSymbol.get(), std::unique_ptr<LIB_FIELD> field = std::make_unique<LIB_FIELD>( aSymbol.get(),
@ -1567,7 +1564,6 @@ LIB_TEXT* SCH_SEXPR_PARSER::parseText()
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a text token." ) ); wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a text token." ) );
T token; T token;
wxString tmp;
std::unique_ptr<LIB_TEXT> text = std::make_unique<LIB_TEXT>( nullptr ); std::unique_ptr<LIB_TEXT> text = std::make_unique<LIB_TEXT>( nullptr );
text->SetUnit( m_unit ); text->SetUnit( m_unit );
@ -2423,7 +2419,6 @@ SCH_SYMBOL* SCH_SEXPR_PARSER::parseSchematicSymbol()
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a symbol." ) ); wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a symbol." ) );
T token; T token;
wxString tmp;
wxString libName; wxString libName;
SCH_FIELD* field; SCH_FIELD* field;
std::unique_ptr<SCH_SYMBOL> symbol = std::make_unique<SCH_SYMBOL>(); std::unique_ptr<SCH_SYMBOL> symbol = std::make_unique<SCH_SYMBOL>();

View File

@ -628,9 +628,6 @@ void SCH_SEXPR_PLUGIN::saveSymbol( SCH_SYMBOL* aSymbol, SCH_SHEET_PATH* aSheetPa
wxCHECK_RET( aSymbol != nullptr && m_out != nullptr, "" ); wxCHECK_RET( aSymbol != nullptr && m_out != nullptr, "" );
std::string libName; std::string libName;
wxArrayString reference_fields;
static wxString delimiters( wxT( " " ) );
wxString symbol_name = aSymbol->GetLibId().Format(); wxString symbol_name = aSymbol->GetLibId().Format();
@ -988,8 +985,6 @@ void SCH_SEXPR_PLUGIN::saveShape( SCH_SHAPE* aShape, int aNestLevel )
{ {
wxCHECK_RET( aShape != nullptr && m_out != nullptr, "" ); wxCHECK_RET( aShape != nullptr && m_out != nullptr, "" );
wxString lineType;
switch( aShape->GetShape() ) switch( aShape->GetShape() )
{ {
case SHAPE_T::ARC: case SHAPE_T::ARC:

View File

@ -1034,7 +1034,6 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter, bool aBackground ) const
if( aBackground && !aPlotter->GetColorMode() ) if( aBackground && !aPlotter->GetColorMode() )
return; return;
wxString msg;
VECTOR2I pos; VECTOR2I pos;
auto* settings = dynamic_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->RenderSettings() ); auto* settings = dynamic_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->RenderSettings() );
bool override = settings ? settings->m_OverrideItemColors : false; bool override = settings ? settings->m_OverrideItemColors : false;

View File

@ -812,7 +812,6 @@ void SCH_SYMBOL::UpdateFields( const SCH_SHEET_PATH* aPath, bool aUpdateStyle, b
{ {
if( m_part ) if( m_part )
{ {
wxString symbolName;
std::vector<LIB_FIELD*> fields; std::vector<LIB_FIELD*> fields;
m_part->GetFields( fields ); m_part->GetFields( fields );
@ -1125,8 +1124,6 @@ bool SCH_SYMBOL::AddSheetPathReferenceEntryIfMissing( const KIID_PATH& aSheetPat
// a empty sheet path is illegal: // a empty sheet path is illegal:
wxCHECK( aSheetPath.size() > 0, false ); wxCHECK( aSheetPath.size() > 0, false );
wxString reference_path;
for( const SYMBOL_INSTANCE_REFERENCE& instance : m_instanceReferences ) for( const SYMBOL_INSTANCE_REFERENCE& instance : m_instanceReferences )
{ {
// if aSheetPath is found, nothing to do: // if aSheetPath is found, nothing to do:

View File

@ -426,8 +426,6 @@ void SCH_TEXT::Plot( PLOTTER* aPlotter, bool aBackground ) const
if( aBackground ) if( aBackground )
return; return;
static std::vector<VECTOR2I> s_poly;
RENDER_SETTINGS* settings = aPlotter->RenderSettings(); RENDER_SETTINGS* settings = aPlotter->RenderSettings();
SCH_CONNECTION* connection = Connection(); SCH_CONNECTION* connection = Connection();
int layer = ( connection && connection->IsBus() ) ? LAYER_BUS : m_layer; int layer = ( connection && connection->IsBus() ) ? LAYER_BUS : m_layer;

View File

@ -58,7 +58,6 @@ SYMBOL_SAVEAS_TYPE SYMBOL_LEGACYFILEDLG_SAVE_AS::m_option = SYMBOL_SAVEAS_TYPE::
void SYMBOL_EDIT_FRAME::updateTitle() void SYMBOL_EDIT_FRAME::updateTitle()
{ {
wxString lib = GetCurLib();
wxString title; wxString title;
if( GetCurSymbol() && IsSymbolFromSchematic() ) if( GetCurSymbol() && IsSymbolFromSchematic() )
@ -299,7 +298,6 @@ bool SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib( const wxString& aAliasName, in
bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxString& aLibrary, bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxString& aLibrary,
int aUnit, int aConvert ) int aUnit, int aConvert )
{ {
wxString msg, rootName;
bool rebuildMenuAndToolbar = false; bool rebuildMenuAndToolbar = false;
if( !aEntry || aLibrary.empty() ) if( !aEntry || aLibrary.empty() )

View File

@ -113,7 +113,7 @@ void SYMBOL_EDIT_FRAME::ImportSymbol()
void SYMBOL_EDIT_FRAME::ExportSymbol() void SYMBOL_EDIT_FRAME::ExportSymbol()
{ {
wxString msg, title; wxString msg;
LIB_SYMBOL* symbol = getTargetSymbol(); LIB_SYMBOL* symbol = getTargetSymbol();
if( !symbol ) if( !symbol )

View File

@ -477,8 +477,6 @@ void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
lib_dialog.Show(); lib_dialog.Show();
} }
wxString progress_message;
for( unsigned i = 0; i < lib_names.GetCount(); ++i ) for( unsigned i = 0; i < lib_names.GetCount(); ++i )
{ {
if( aShowProgress ) if( aShowProgress )

View File

@ -66,7 +66,6 @@ bool BACK_ANNOTATE::BackAnnotateSymbols( const std::string& aNetlist )
{ {
m_changesCount = 0; m_changesCount = 0;
m_appendUndo = false; m_appendUndo = false;
wxString msg;
if( !m_matchByReference && !m_processValues && !m_processFootprints && !m_processReferences if( !m_matchByReference && !m_processValues && !m_processFootprints && !m_processReferences
&& !m_processNetNames ) && !m_processNetNames )

View File

@ -1477,7 +1477,6 @@ int EE_SELECTION_TOOL::SelectConnection( const TOOL_EVENT& aEvent )
return 0; return 0;
SCH_LINE* line = (SCH_LINE*) m_selection.Front(); SCH_LINE* line = (SCH_LINE*) m_selection.Front();
EDA_ITEMS items;
unsigned done = false; unsigned done = false;
m_frame->GetScreen()->ClearDrawingState(); m_frame->GetScreen()->ClearDrawingState();

View File

@ -518,8 +518,6 @@ int SYMBOL_EDITOR_CONTROL::ExportView( const TOOL_EVENT& aEvent )
return 0; return 0;
} }
wxString file_ext = wxT( "png" );
wxString mask = wxT( "*." ) + file_ext;
wxFileName fn( symbol->GetName() ); wxFileName fn( symbol->GetName() );
fn.SetExt( "png" ); fn.SetExt( "png" );
@ -558,7 +556,6 @@ int SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG( const TOOL_EVENT& aEvent )
return 0; return 0;
} }
wxString file_ext = SVGFileExtension;
wxFileName fn( symbol->GetName() ); wxFileName fn( symbol->GetName() );
fn.SetExt( SVGFileExtension ); fn.SetExt( SVGFileExtension );