← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix warnings for unreferenced local variables

 

---
 common/utf8.cpp                                   | 2 +-
 eeschema/cross-probing.cpp                        | 2 +-
 eeschema/dialogs/dialog_edit_components_libid.cpp | 2 +-
 eeschema/libarch.cpp                              | 2 +-
 eeschema/sch_component.cpp                        | 2 +-
 eeschema/sch_edit_frame.cpp                       | 2 +-
 eeschema/selpart.cpp                              | 2 +-
 eeschema/symbedit.cpp                             | 2 +-
 eeschema/viewlib_frame.cpp                        | 2 +-
 eeschema/viewlibs.cpp                             | 2 +-
 eeschema/widgets/tuner_slider.cpp                 | 6 +++---
 pcbnew/cross-probing.cpp                          | 2 +-
 pcbnew/kicad_plugin.cpp                           | 2 +-
 13 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/common/utf8.cpp b/common/utf8.cpp
index eb350d9d1..57677ca7c 100644
--- a/common/utf8.cpp
+++ b/common/utf8.cpp
@@ -187,7 +187,7 @@ bool IsUTF8( const char* aString )
             if( next > end )
                 return false;
         }
-        catch( const IO_ERROR& ioe )
+        catch( const IO_ERROR& )
         {
             return false;
         }
diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp
index 312828375..a257069f2 100644
--- a/eeschema/cross-probing.cpp
+++ b/eeschema/cross-probing.cpp
@@ -264,7 +264,7 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
         {
             importFormat = std::stoi( payload.substr( 0, split ) );
         }
-        catch( std::invalid_argument& e )
+        catch( std::invalid_argument& )
         {
             wxFAIL;
             importFormat = -1;
diff --git a/eeschema/dialogs/dialog_edit_components_libid.cpp b/eeschema/dialogs/dialog_edit_components_libid.cpp
index 304f90e2e..8b80eebbf 100644
--- a/eeschema/dialogs/dialog_edit_components_libid.cpp
+++ b/eeschema/dialogs/dialog_edit_components_libid.cpp
@@ -447,7 +447,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event )
             {
                 Prj().SchSymbolLibTable()->EnumerateSymbolLib( lib, aliasNames );
             }
-            catch( const IO_ERROR& e ) {}   // ignore, it is handled below
+            catch( const IO_ERROR& ) {}   // ignore, it is handled below
 
             if( aliasNames.IsEmpty() )
                 continue;
diff --git a/eeschema/libarch.cpp b/eeschema/libarch.cpp
index a4f3bb82a..a62c38d79 100644
--- a/eeschema/libarch.cpp
+++ b/eeschema/libarch.cpp
@@ -96,7 +96,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
 
                 part = GetLibPart( component->GetLibId(), true );
             }
-            catch( const IO_ERROR& ioe )
+            catch( const IO_ERROR& )
             {
                 // Queue up error messages for later.
                 tmp.Printf( _( "Failed to add symbol %s to library file." ),
diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp
index ab0ea1b6b..4dc29ea6d 100644
--- a/eeschema/sch_component.cpp
+++ b/eeschema/sch_component.cpp
@@ -340,7 +340,7 @@ bool SCH_COMPONENT::Resolve( SYMBOL_LIB_TABLE& aLibTable, PART_LIB* aCacheLib )
             return true;
         }
     }
-    catch( const IO_ERROR& ioe )
+    catch( const IO_ERROR& )
     {
         wxLogDebug( "Cannot resolve library symbol %s", m_lib_id.Format().wx_str() );
     }
diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp
index 177aefba4..740a6b799 100644
--- a/eeschema/sch_edit_frame.cpp
+++ b/eeschema/sch_edit_frame.cpp
@@ -1171,7 +1171,7 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event )
 
         player->Raise();
     }
-    catch( const IO_ERROR& e )
+    catch( const IO_ERROR& )
     {
         DisplayError( this, _( "Could not open CvPcb" ) );
     }
diff --git a/eeschema/selpart.cpp b/eeschema/selpart.cpp
index a9d9bd23e..b7038c365 100644
--- a/eeschema/selpart.cpp
+++ b/eeschema/selpart.cpp
@@ -58,7 +58,7 @@ static void DisplayCmpDocAndKeywords( wxString& aSelection, void* aData )
     {
         part = libs->LoadSymbol( id );
     }
-    catch( const IO_ERROR& ioe )
+    catch( const IO_ERROR& )
     {
         aSelection.Printf( _( "Error occurred loading symbol \"%s\" from library \"%s\"." ),
                            id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp
index 701351379..a45e6c841 100644
--- a/eeschema/symbedit.cpp
+++ b/eeschema/symbedit.cpp
@@ -111,7 +111,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol()
     {
         alias = pi->LoadSymbol( filename, symbols[0] );
     }
-    catch( const IO_ERROR& ioe )
+    catch( const IO_ERROR& )
     {
         return;
     }
diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp
index 0be1c6b21..b768f8082 100644
--- a/eeschema/viewlib_frame.cpp
+++ b/eeschema/viewlib_frame.cpp
@@ -497,7 +497,7 @@ bool LIB_VIEW_FRAME::ReCreateListCmp()
         Prj().SchSymbolLibTable()->EnumerateSymbolLib( m_libraryName, aliasNames,
                                                        m_listPowerCmpOnly );
     }
-    catch( const IO_ERROR& e ) {}   // ignore, it is handled below
+    catch( const IO_ERROR& ) {}   // ignore, it is handled below
 
     if( aliasNames.IsEmpty() )
     {
diff --git a/eeschema/viewlibs.cpp b/eeschema/viewlibs.cpp
index 3c09a7a7b..5d4dce5d6 100644
--- a/eeschema/viewlibs.cpp
+++ b/eeschema/viewlibs.cpp
@@ -195,7 +195,7 @@ void LIB_VIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
     {
         entry = Prj().SchSymbolLibTable()->LoadSymbol( id );
     }
-    catch( const IO_ERROR& e ) {} // ignore, it is handled below
+    catch( const IO_ERROR& ) {} // ignore, it is handled below
 
     if( !entry )
         return;
diff --git a/eeschema/widgets/tuner_slider.cpp b/eeschema/widgets/tuner_slider.cpp
index 9f863ba16..fc73cc013 100644
--- a/eeschema/widgets/tuner_slider.cpp
+++ b/eeschema/widgets/tuner_slider.cpp
@@ -160,7 +160,7 @@ void TUNER_SLIDER::onMaxTextEnter( wxCommandEvent& event )
         SPICE_VALUE newMax( m_maxText->GetValue() );
         SetMax( newMax );
     }
-    catch( std::exception& e )
+    catch( std::exception& )
     {
         // Restore the previous value
         m_maxText->SetValue( m_max.ToOrigString() );
@@ -176,7 +176,7 @@ void TUNER_SLIDER::onValueTextEnter( wxCommandEvent& event )
         SetValue( newCur );
         m_changed = true;
     }
-    catch( std::exception& e )
+    catch( std::exception& )
     {
         // Restore the previous value
         m_valueText->SetValue( m_value.ToOrigString() );
@@ -191,7 +191,7 @@ void TUNER_SLIDER::onMinTextEnter( wxCommandEvent& event )
         SPICE_VALUE newMin( m_minText->GetValue() );
         SetMin( newMin );
     }
-    catch( std::exception& e )
+    catch( std::exception& )
     {
         // Restore the previous value
         m_minText->SetValue( m_min.ToOrigString() );
diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp
index 14603bc14..f9c152785 100644
--- a/pcbnew/cross-probing.cpp
+++ b/pcbnew/cross-probing.cpp
@@ -422,7 +422,7 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
         {
             importFormat = std::stoi( payload.substr( 0, split ) );
         }
-        catch( std::invalid_argument& e )
+        catch( std::invalid_argument& )
         {
             wxFAIL;
             importFormat = -1;
diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp
index 5840a3d8d..5c1d645ed 100644
--- a/pcbnew/kicad_plugin.cpp
+++ b/pcbnew/kicad_plugin.cpp
@@ -2017,7 +2017,7 @@ MODULE* PCB_IO::doLoadFootprint( const wxString& aLibraryPath,
     {
         validateCache( aLibraryPath, checkModified );
     }
-    catch( const IO_ERROR& ioe )
+    catch( const IO_ERROR& )
     {
         // do nothing with the error
     }

Follow ups