Fix warnings for unreferenced local variables

This commit is contained in:
Simon Richter 2018-04-18 09:10:29 +02:00 committed by Wayne Stambaugh
parent 3179e40b57
commit 7e47ef7471
13 changed files with 15 additions and 15 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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." ),

View File

@ -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() );
}

View File

@ -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" ) );
}

View File

@ -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() );

View File

@ -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;
}

View File

@ -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() )
{

View File

@ -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;

View File

@ -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() );

View File

@ -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;

View File

@ -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
}