diff --git a/gerbview/dialogs/dialog_print_gerbview.cpp b/gerbview/dialogs/dialog_print_gerbview.cpp index 3535a61060..74a88c3222 100644 --- a/gerbview/dialogs/dialog_print_gerbview.cpp +++ b/gerbview/dialogs/dialog_print_gerbview.cpp @@ -124,7 +124,6 @@ bool DIALOG_PRINT_GERBVIEW::TransferDataToWindow() // Create layer list for( unsigned ii = 0; ii < images->ImagesMaxCount(); ++ii ) { - wxString layerName; unsigned int listIdx = itemIdx / LAYER_PER_LIST; if( listIdx >= LAYER_LIST_COUNT ) diff --git a/gerbview/job_file_reader.cpp b/gerbview/job_file_reader.cpp index 03629ee6f9..d40083b79b 100644 --- a/gerbview/job_file_reader.cpp +++ b/gerbview/job_file_reader.cpp @@ -115,7 +115,6 @@ bool GERBER_JOBFILE_READER::ReadGerberJobFile() FILE_LINE_READER jobfileReader( jobFile, m_filename.GetFullPath() ); // Will close jobFile - wxString msg; wxString data; // detect the file format: old (deprecated) gerber format of official JSON format diff --git a/kicad/project_tree_item.cpp b/kicad/project_tree_item.cpp index 38dff6f716..dbeb54434a 100644 --- a/kicad/project_tree_item.cpp +++ b/kicad/project_tree_item.cpp @@ -173,7 +173,6 @@ void PROJECT_TREE_ITEM::Delete() void PROJECT_TREE_ITEM::Activate( PROJECT_TREE_PANE* aTreePrjFrame ) { - wxString sep = wxFileName::GetPathSeparator(); wxString fullFileName = GetFileName(); wxTreeItemId id = GetId(); std::string packet; diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp index 62965cbc46..577bfc109a 100644 --- a/kicad/project_tree_pane.cpp +++ b/kicad/project_tree_pane.cpp @@ -647,8 +647,6 @@ void PROJECT_TREE_PANE::onRight( wxTreeEvent& Event ) can_delete = item->CanDelete(); can_rename = item->CanRename(); - wxString full_file_name = item->GetFileName(); - switch( item->GetType() ) { case TREE_FILE_TYPE::LEGACY_PROJECT: diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 53434cc31d..6da1974cf5 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -138,7 +138,6 @@ int KICAD_MANAGER_CONTROL::NewFromTemplate( const TOOL_EVENT& aEvent ) DIALOG_TEMPLATE_SELECTOR* ps = new DIALOG_TEMPLATE_SELECTOR( m_frame ); wxFileName templatePath; - wxString envStr; // KiCad system template path. ENV_VAR_MAP_CITER it = Pgm().GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" ); @@ -212,7 +211,6 @@ int KICAD_MANAGER_CONTROL::NewFromTemplate( const TOOL_EVENT& aEvent ) fn.AppendDir( fn.GetName() ); // Check if the project directory is empty if it already exists. - wxDir directory( fn.GetPath() ); if( !fn.DirExists() ) { diff --git a/pagelayout_editor/toolbars_pl_editor.cpp b/pagelayout_editor/toolbars_pl_editor.cpp index 4dedbb4e57..923a3ef364 100644 --- a/pagelayout_editor/toolbars_pl_editor.cpp +++ b/pagelayout_editor/toolbars_pl_editor.cpp @@ -40,8 +40,6 @@ void PL_EDITOR_FRAME::ReCreateHToolbar() m_mainToolBar->SetAuiManager( &m_auimgr ); } - wxString msg; - m_mainToolBar->Add( ACTIONS::doNew ); m_mainToolBar->Add( ACTIONS::open ); m_mainToolBar->Add( ACTIONS::save ); diff --git a/pcb_calculator/calculator_panels/panel_cable_size.cpp b/pcb_calculator/calculator_panels/panel_cable_size.cpp index 3b20831769..e81b1b8871 100644 --- a/pcb_calculator/calculator_panels/panel_cable_size.cpp +++ b/pcb_calculator/calculator_panels/panel_cable_size.cpp @@ -146,7 +146,6 @@ void PANEL_CABLE_SIZE::OnCableSizeChange( wxCommandEvent& aEvent ) { double value; int index = m_sizeChoice->GetSelection(); - wxString str; if( ( index >= 0 ) && ( index < m_entries.size() ) ) { diff --git a/pcb_calculator/calculator_panels/panel_fusing_current.cpp b/pcb_calculator/calculator_panels/panel_fusing_current.cpp index 17d403faf2..5fd7cd5ea5 100644 --- a/pcb_calculator/calculator_panels/panel_fusing_current.cpp +++ b/pcb_calculator/calculator_panels/panel_fusing_current.cpp @@ -41,7 +41,6 @@ PANEL_FUSING_CURRENT::PANEL_FUSING_CURRENT( wxWindow * parent, wxWindowID id, PANEL_FUSING_CURRENT_BASE( parent, id, pos, size, style, name ) { // Set some defaults - wxString wxs( "" ); m_ambientValue->SetValue( wxString::Format( wxT( "%i" ), 25 ) ); m_meltingValue->SetValue( wxString::Format( wxT( "%i" ), 1084 ) ); // Value for copper m_meltingValue->SetEditable( false ); // For now, this panel only works for copper. diff --git a/pcb_calculator/calculator_panels/panel_track_width.cpp b/pcb_calculator/calculator_panels/panel_track_width.cpp index 887961208b..eba1fa3165 100644 --- a/pcb_calculator/calculator_panels/panel_track_width.cpp +++ b/pcb_calculator/calculator_panels/panel_track_width.cpp @@ -445,8 +445,6 @@ double PANEL_TRACK_WIDTH::TWCalculateCurrent( double aWidth, double aThickness, void PANEL_TRACK_WIDTH::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { - wxString msg; - // Disable calculations while we initialise. m_TWNested = true; diff --git a/pcb_calculator/eserie.cpp b/pcb_calculator/eserie.cpp index 293fa3947c..2bc0f41ced 100644 --- a/pcb_calculator/eserie.cpp +++ b/pcb_calculator/eserie.cpp @@ -182,7 +182,6 @@ void E_SERIE::combine4( uint32_t aSize ) { uint32_t i,j; double tmp; - std::string s; m_results.at( S4R ).e_use = false; // disable 4R solution, until m_results.at( S4R ).e_value = m_results.at( S3R ).e_value; // 4R becomes better than 3R solution diff --git a/pcbnew/autorouter/ar_autoplacer.cpp b/pcbnew/autorouter/ar_autoplacer.cpp index 7ea7d6e8b1..bc1a176118 100644 --- a/pcbnew/autorouter/ar_autoplacer.cpp +++ b/pcbnew/autorouter/ar_autoplacer.cpp @@ -611,11 +611,12 @@ int AR_AUTOPLACER::getOptimalFPPlacement( FOOTPRINT* aFootprint ) { lastPosOK = m_curPosition; min_cost = Score; +/* wxString msg; -/* msg.Printf( wxT( "Score %g, pos %s, %s" ), + msg.Printf( wxT( "Score %g, pos %s, %s" ), min_cost, - GetChars( ::CoordinateToString( LastPosOK.x ) ), - GetChars( ::CoordinateToString( LastPosOK.y ) ) ); + ::CoordinateToString( LastPosOK.x ), + ::CoordinateToString( LastPosOK.y ) ); m_frame->SetStatusText( msg );*/ } } @@ -882,7 +883,6 @@ AR_RESULT AR_AUTOPLACER::AutoplaceFootprints( std::vector& aFootprin int cnt = 0; - wxString msg; if( m_progressReporter ) { @@ -900,7 +900,6 @@ AR_RESULT AR_AUTOPLACER::AutoplaceFootprints( std::vector& aFootprin while( ( footprint = pickFootprint() ) != nullptr ) { // Display some info about activity, footprint placement can take a while: - //m_frame->SetStatusText( msg ); if( m_progressReporter ) m_progressReporter->SetTitle( wxString::Format( _( "Autoplacing %s" ), diff --git a/pcbnew/connectivity/from_to_cache.cpp b/pcbnew/connectivity/from_to_cache.cpp index a31eb396ab..881268f28a 100644 --- a/pcbnew/connectivity/from_to_cache.cpp +++ b/pcbnew/connectivity/from_to_cache.cpp @@ -140,7 +140,6 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo for( FT_PATH& path : paths ) { int count = 0; - auto netName = path.from->GetNetname(); wxString fromName = path.from->GetParent()->GetReference() + wxT( "-" ) + path.from->GetNumber(); diff --git a/pcbnew/dialogs/dialog_board_reannotate.cpp b/pcbnew/dialogs/dialog_board_reannotate.cpp index 659275e63c..6e0bdabbc0 100644 --- a/pcbnew/dialogs/dialog_board_reannotate.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate.cpp @@ -300,8 +300,6 @@ void DIALOG_BOARD_REANNOTATE::OnApplyClick( wxCommandEvent& event ) void DIALOG_BOARD_REANNOTATE::MakeSampleText( wxString& aMessage ) { - wxString tmp; - aMessage.Printf( _( "\n%s footprints will be reannotated." ), _( AnnotateString[m_annotationScope] ) ); diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index 14035c2056..b253682984 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -315,7 +315,6 @@ void DIALOG_EXCHANGE_FOOTPRINTS::OnOKClicked( wxCommandEvent& event ) void DIALOG_EXCHANGE_FOOTPRINTS::processMatchingFootprints() { LIB_ID newFPID; - wxString value; if( m_parent->GetBoard()->Footprints().empty() ) return; diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp index f6efb74950..f97a073175 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp @@ -107,7 +107,6 @@ void DIALOG_FOOTPRINT_WIZARD_LIST::initLists() FOOTPRINT_WIZARD *wizard = FOOTPRINT_WIZARD_LIST::GetWizard( ii ); wxString name = wizard->GetName(); wxString description = wizard->GetDescription(); - wxString image = wizard->GetImage(); m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NUMBER, num ); m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NAME, name ); diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 54499fabb7..2eb72fcbdf 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -326,8 +326,6 @@ void DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) void DIALOG_GENDRILL::UpdateDrillParams() { - wxString msg; - // Set output directory and replace backslashes with forward ones wxString dirStr; dirStr = m_outputDirectoryName->GetValue(); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 1c2d91ca04..20fb53495b 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1245,7 +1245,6 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() wxArrayString error_msgs; wxArrayString warning_msgs; - wxString msg; VECTOR2I pad_size = m_dummyPad->GetSize(); VECTOR2I drill_size = m_dummyPad->GetDrillSize(); @@ -1732,14 +1731,15 @@ void DIALOG_PAD_PROPERTIES::updatePadSizeControls() bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad ) { - wxString msg; - if( !Validate() ) return false; + if( !m_panelGeneral->Validate() ) return false; + if( !m_localSettingsPanel->Validate() ) return false; + if( !m_spokeWidth.Validate( 0, INT_MAX ) ) return false; diff --git a/pcbnew/dialogs/panel_setup_layers.cpp b/pcbnew/dialogs/panel_setup_layers.cpp index 78d3d2ac6f..eac15bf06d 100644 --- a/pcbnew/dialogs/panel_setup_layers.cpp +++ b/pcbnew/dialogs/panel_setup_layers.cpp @@ -419,7 +419,6 @@ void PANEL_SETUP_LAYERS::OnCheckBox( wxCommandEvent& event ) void PANEL_SETUP_LAYERS::DenyChangeCheckBox( wxCommandEvent& event ) { wxObject* source = event.GetEventObject(); - wxString msg; for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq ) { diff --git a/pcbnew/dialogs/panel_setup_rules.cpp b/pcbnew/dialogs/panel_setup_rules.cpp index 2572a7d63b..239b0ebfb6 100644 --- a/pcbnew/dialogs/panel_setup_rules.cpp +++ b/pcbnew/dialogs/panel_setup_rules.cpp @@ -102,7 +102,6 @@ void PANEL_SETUP_RULES::onCharHook( wxKeyEvent& aEvent ) void PANEL_SETUP_RULES::OnContextMenu(wxMouseEvent &event) { wxMenu menu; - wxString msg; menu.Append( wxID_UNDO, _( "Undo" ) ); menu.Append( wxID_REDO, _( "Redo" ) ); diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index 29141095df..9547542131 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -370,7 +370,7 @@ void IPC356D_WRITER::Write( const wxString& aFilename ) void PCB_EDIT_FRAME::GenD356File( wxCommandEvent& aEvent ) { wxFileName fn = GetBoard()->GetFileName(); - wxString msg, ext, wildcard; + wxString ext, wildcard; ext = IpcD356FileExtension; wildcard = IpcD356FileWildcard(); diff --git a/pcbnew/exporters/gerber_jobfile_writer.cpp b/pcbnew/exporters/gerber_jobfile_writer.cpp index f2a0ec243e..1825267c47 100644 --- a/pcbnew/exporters/gerber_jobfile_writer.cpp +++ b/pcbnew/exporters/gerber_jobfile_writer.cpp @@ -166,8 +166,6 @@ bool GERBER_JOBFILE_WRITER::CreateJobFile( const wxString& aFullFilename ) void GERBER_JOBFILE_WRITER::addJSONHeader() { - wxString text; - m_json["Header"] = { { "GenerationSoftware", diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index eb47043239..4cc306f74a 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -1241,8 +1241,6 @@ void FOOTPRINT_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTe void FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng( wxCommandEvent& event ) { - wxString fullFileName; - LIB_ID id = GetLoadedFPID(); if( id.empty() ) diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index b8327a8f13..c190e89211 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -1163,7 +1163,6 @@ void FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList( wxCommandEvent& event ) void FOOTPRINT_VIEWER_FRAME::UpdateTitle() { wxString title; - wxString path; if( !getCurNickname().IsEmpty() ) { diff --git a/pcbnew/pcb_dimension.cpp b/pcbnew/pcb_dimension.cpp index e0b718adb0..c048e91a90 100644 --- a/pcbnew/pcb_dimension.cpp +++ b/pcbnew/pcb_dimension.cpp @@ -1084,8 +1084,6 @@ void PCB_DIM_LEADER::updateGeometry() void PCB_DIM_LEADER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { - wxString msg; - aList.emplace_back( _( "Leader" ), m_text.GetShownText() ); ORIGIN_TRANSFORMS originTransforms = aFrame->GetOriginTransforms(); diff --git a/pcbnew/pcb_track.cpp b/pcbnew/pcb_track.cpp index 760313cfda..8ce8797891 100644 --- a/pcbnew/pcb_track.cpp +++ b/pcbnew/pcb_track.cpp @@ -852,8 +852,6 @@ void PCB_VIA::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) const { - wxString msg; - aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) ); diff --git a/pcbnew/python/scripting/pcbnew_footprint_wizards.cpp b/pcbnew/python/scripting/pcbnew_footprint_wizards.cpp index bcf7e0bd5b..2a8cf0aae0 100644 --- a/pcbnew/python/scripting/pcbnew_footprint_wizards.cpp +++ b/pcbnew/python/scripting/pcbnew_footprint_wizards.cpp @@ -117,7 +117,6 @@ wxArrayString PYTHON_FOOTPRINT_WIZARD::CallRetArrayStrMethod( const char* aMet PyObject* aArglist ) { wxArrayString ret; - wxString str_item; PyLOCK lock; PyObject* result = CallMethod( aMethod, aArglist ); diff --git a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp index bfb743c5fc..a3fcbe9148 100644 --- a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp +++ b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp @@ -260,7 +260,6 @@ bool SaveBoard( wxString& aFileName, BOARD* aBoard, IO_MGR::PCB_FILE_T aFormat, wxFileName pro = aFileName; pro.SetExt( ProjectFileExtension ); pro.MakeAbsolute(); - wxString projectPath = pro.GetFullPath(); GetSettingsManager()->SaveProjectAs( pro.GetFullPath(), aBoard->GetProject() ); } diff --git a/pcbnew/toolbars_footprint_editor.cpp b/pcbnew/toolbars_footprint_editor.cpp index 73be26656b..786903b218 100644 --- a/pcbnew/toolbars_footprint_editor.cpp +++ b/pcbnew/toolbars_footprint_editor.cpp @@ -54,8 +54,6 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->SetAuiManager( &m_auimgr ); } - wxString msg; - // Set up toolbar m_mainToolBar->Add( PCB_ACTIONS::newFootprint ); m_mainToolBar->Add( PCB_ACTIONS::createFootprint ); diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 4d856e485e..9482e9a88c 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -367,8 +367,6 @@ int FOOTPRINT_EDITOR_CONTROL::PasteFootprint( const TOOL_EVENT& aEvent ) int FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint( const TOOL_EVENT& aEvent ) { LIB_ID fpID = m_frame->GetTreeFPID(); - wxString libraryName = fpID.GetLibNickname(); - wxString footprintName = fpID.GetLibItemName(); FOOTPRINT* footprint; if( fpID == m_frame->GetLoadedFPID() ) diff --git a/utils/kicad2step/pcb/3d_resolver.cpp b/utils/kicad2step/pcb/3d_resolver.cpp index f48532aea3..ea6241d026 100644 --- a/utils/kicad2step/pcb/3d_resolver.cpp +++ b/utils/kicad2step/pcb/3d_resolver.cpp @@ -332,7 +332,6 @@ bool S3D_RESOLVER::addPath( const SEARCH_PATH& aPath ) #endif } - wxString pname = path.GetPath(); std::list< SEARCH_PATH >::iterator sPL = m_Paths.begin(); std::list< SEARCH_PATH >::iterator ePL = m_Paths.end();