Fix a few Coverity warnings (uninitialized vars)

This commit is contained in:
jean-pierre charras 2025-04-27 18:23:31 +02:00
parent 2fa54615ee
commit 0755ab8ea9
4 changed files with 13 additions and 3 deletions

View File

@ -53,15 +53,21 @@ static std::map<TOOLBAR_LOC, wxString> s_toolbarNameMap = {
class TOOLBAR_TREE_ITEM_DATA : public wxTreeItemData
{
public:
TOOLBAR_TREE_ITEM_DATA()
TOOLBAR_TREE_ITEM_DATA() :
m_type( TOOLBAR_ITEM_TYPE::SEPARATOR ), // Init m_type to something
m_action( nullptr ),
m_size( 0 )
{ }
TOOLBAR_TREE_ITEM_DATA( TOOLBAR_ITEM_TYPE aType ) :
m_type( aType )
m_type( aType ),
m_action( nullptr ),
m_size( 0 )
{ }
TOOLBAR_TREE_ITEM_DATA( TOOLBAR_ITEM_TYPE aType, int aSize ) :
m_type( aType ),
m_action( nullptr ),
m_size( aSize )
{
wxASSERT( aType == TOOLBAR_ITEM_TYPE::SPACER );
@ -69,6 +75,8 @@ public:
TOOLBAR_TREE_ITEM_DATA( TOOLBAR_ITEM_TYPE aType, wxString aName ) :
m_type( aType ),
m_action( nullptr ),
m_size( 0 ),
m_name( aName )
{
wxASSERT( aType == TOOLBAR_ITEM_TYPE::CONTROL

View File

@ -61,6 +61,7 @@ ACTION_GROUP::ACTION_GROUP( const std::string_view& aName )
{
m_name = aName;
m_id = ACTION_MANAGER::MakeActionId( m_name );
m_defaultAction = nullptr;
}

View File

@ -63,6 +63,7 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
m_boardFinish( nullptr ),
m_physicalStackup( nullptr ),
m_timeDomainParameters( nullptr ),
m_netClasses( nullptr ),
m_currentPage( 0 ),
m_layersPage( 0 ),
m_physicalStackupPage( 0 ),
@ -78,7 +79,6 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
m_customRulesPage( 0 ),
m_severitiesPage( 0 ),
m_timeDomainParametersPage( 0 )
{
SetEvtHandlerEnabled( false );

View File

@ -56,6 +56,7 @@ MEANDER_SETTINGS::MEANDER_SETTINGS()
m_lengthTolerance = 0;
m_keepEndpoints = false;
m_isTimeDomain = false;
m_netClass = nullptr;
}