Fix a few Coverity warnings (not initialized vars)

This commit is contained in:
jean-pierre charras 2023-05-14 10:11:38 +02:00
parent bd71cec826
commit 3be8bfe193
3 changed files with 8 additions and 2 deletions

View File

@ -67,6 +67,8 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
}, _( "Field Name Templates" ) ); }, _( "Field Name Templates" ) );
m_treebook->AddPage( new wxPanel( GetTreebook() ), _( "Electrical Rules" ) ); m_treebook->AddPage( new wxPanel( GetTreebook() ), _( "Electrical Rules" ) );
m_severitiesPage = m_treebook->GetPageCount();
m_treebook->AddLazySubPage( m_treebook->AddLazySubPage(
[this]( wxWindow* aParent ) -> wxWindow* [this]( wxWindow* aParent ) -> wxWindow*
{ {

View File

@ -55,6 +55,7 @@ const wxChar* NL_SCHEMATIC_PLUGIN_IMPL::m_logTrace = wxT( "KI_TRACE_NL_SCHEMATIC
NL_SCHEMATIC_PLUGIN_IMPL::NL_SCHEMATIC_PLUGIN_IMPL() : NL_SCHEMATIC_PLUGIN_IMPL::NL_SCHEMATIC_PLUGIN_IMPL() :
CNavigation3D( false, false ), CNavigation3D( false, false ),
m_viewport2D( nullptr ), m_viewport2D( nullptr ),
m_view( nullptr ),
m_isMoving( false ), m_isMoving( false ),
m_viewportWidth( 0.0 ) m_viewportWidth( 0.0 )
{ {

View File

@ -890,8 +890,11 @@ SCH_LABEL_BASE* LTSPICE_SCH_PARSER::CreateSCH_LABEL( KICAD_T aType, const VECTOR
UNIMPLEMENTED_FOR( aType ); UNIMPLEMENTED_FOR( aType );
} }
label->SetPosition( ToKicadCoords( aOffset ) + m_originOffset ); if( label )
label->SetVisible( true ); {
label->SetPosition( ToKicadCoords( aOffset ) + m_originOffset );
label->SetVisible( true );
}
return label; return label;
} }