Fix minor Coverity warnings and minor compil warnings.

(uninitialized or shadowed vars)
This commit is contained in:
jean-pierre charras 2021-05-04 20:50:27 +02:00
parent a8672dd2f9
commit 56058314be
4 changed files with 8 additions and 4 deletions

View File

@ -61,6 +61,7 @@ class ENV_VAR_ITEM
public:
ENV_VAR_ITEM( const wxString& aValue = wxEmptyString, bool aIsDefinedExternally = false ) :
m_value( aValue ),
m_isBuiltin( true ),
m_isDefinedExternally( aIsDefinedExternally ),
m_isDefinedInSettings( false )
{

View File

@ -341,7 +341,9 @@ struct APP_KICAD : public wxApp
wxKeyEvent* keyEvent = static_cast<wxKeyEvent*>( &aEvent );
if( keyEvent )
{
wxLogTrace( kicadTraceKeyEvent, "APP_KICAD::ProcessEvent %s", dump( *keyEvent ) );
}
}
aEvent.Skip();

View File

@ -968,7 +968,8 @@ void LEADER::updateGeometry()
SEG arrowSeg( m_start, m_end );
SEG textSeg( m_end, m_text.GetPosition() );
OPT_VECTOR2I arrowSegEnd, textSegEnd;
OPT_VECTOR2I arrowSegEnd = boost::make_optional( false, VECTOR2I() );;
OPT_VECTOR2I textSegEnd = boost::make_optional( false, VECTOR2I() );
if( m_textFrame == DIM_TEXT_FRAME::CIRCLE )
{

View File

@ -303,10 +303,10 @@ void DRC_ENGINE::loadImplicitRules()
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
netclassItemSpecificRules.push_back( netclassRule );
DRC_CONSTRAINT clearanceConstraint( CLEARANCE_CONSTRAINT );
clearanceConstraint.Value().SetMin( std::max( bds.m_MinClearance,
DRC_CONSTRAINT min_clearanceConstraint( CLEARANCE_CONSTRAINT );
min_clearanceConstraint.Value().SetMin( std::max( bds.m_MinClearance,
nc->GetDiffPairGap() ) );
netclassRule->AddConstraint( clearanceConstraint );
netclassRule->AddConstraint( min_clearanceConstraint );
}
if( nc->GetViaDiameter() || nc->GetViaDrill() )