From 50b2271f843422e56a1e867563e42a065b8b5d1d Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sat, 18 Jul 2020 23:56:39 +0100 Subject: [PATCH] Fix missing variable initialization --- 3d-viewer/3d_rendering/cpostshader_ssao.cpp | 6 ++++-- common/project.cpp | 3 ++- common/settings/app_settings.cpp | 9 ++++++++- common/settings/common_settings.cpp | 7 ++++++- common/tool/tool_manager.cpp | 9 +++++---- eeschema/eeschema_settings.cpp | 17 ++++++++++++++++- eeschema/schematic_settings.cpp | 1 + .../altium_parser_pcb.cpp | 1 + pcbnew/pcbnew_settings.cpp | 1 + pcbnew/tools/pad_tool.cpp | 1 + 10 files changed, 45 insertions(+), 10 deletions(-) diff --git a/3d-viewer/3d_rendering/cpostshader_ssao.cpp b/3d-viewer/3d_rendering/cpostshader_ssao.cpp index 55b140323c..c0cea6cf6c 100644 --- a/3d-viewer/3d_rendering/cpostshader_ssao.cpp +++ b/3d-viewer/3d_rendering/cpostshader_ssao.cpp @@ -31,9 +31,11 @@ #include "../3d_fastmath.h" -CPOSTSHADER_SSAO::CPOSTSHADER_SSAO( const CCAMERA &aCamera ) : CPOSTSHADER( aCamera ) +CPOSTSHADER_SSAO::CPOSTSHADER_SSAO( const CCAMERA &aCamera ) : + CPOSTSHADER( aCamera ), + m_shadedBuffer( nullptr ), + m_isUsingShadows( false ) { - m_shadedBuffer = NULL; } // There are differente sources for this shader on the web diff --git a/common/project.cpp b/common/project.cpp index 117f430a44..d374fa82ec 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -40,7 +40,8 @@ PROJECT::PROJECT() : - m_projectFile( nullptr ) + m_projectFile( nullptr ), + m_localSettings( nullptr ) { memset( m_elems, 0, sizeof(m_elems) ); } diff --git a/common/settings/app_settings.cpp b/common/settings/app_settings.cpp index c49fed21d6..40703d7a26 100644 --- a/common/settings/app_settings.cpp +++ b/common/settings/app_settings.cpp @@ -33,7 +33,14 @@ const int appSettingsSchemaVersion = 0; APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaVersion ) : JSON_SETTINGS( aFilename, SETTINGS_LOC::USER, aSchemaVersion ), - m_Printing(), m_System(), m_Window(), m_appSettingsSchemaVersion( aSchemaVersion ) + m_CrossProbing(), + m_FindReplace(), + m_Graphics(), + m_LibTree(), + m_Printing(), + m_System(), + m_Window(), + m_appSettingsSchemaVersion( aSchemaVersion ) { // Make Coverity happy: m_LibTree.column_width = 360; diff --git a/common/settings/common_settings.cpp b/common/settings/common_settings.cpp index 583bcdeca3..b793c23e82 100644 --- a/common/settings/common_settings.cpp +++ b/common/settings/common_settings.cpp @@ -36,7 +36,12 @@ const int commonSchemaVersion = 1; COMMON_SETTINGS::COMMON_SETTINGS() : JSON_SETTINGS( "kicad_common", SETTINGS_LOC::USER, commonSchemaVersion ), - m_Appearance(), m_Env(), m_Input(), m_Graphics(), m_System() + m_Appearance(), + m_Backup(), + m_Env(), + m_Input(), + m_Graphics(), + m_System() { // This only effect the first time KiCad is run. The user's setting will be used for all // subsequent runs. diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index cce320e9bf..81e45a0b2e 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -198,10 +198,11 @@ private: TOOL_MANAGER::TOOL_MANAGER() : - m_model( NULL ), - m_view( NULL ), - m_viewControls( NULL ), - m_frame( NULL ), + m_model( nullptr ), + m_view( nullptr ), + m_viewControls( nullptr ), + m_frame( nullptr ), + m_settings( nullptr ), m_warpMouseAfterContextMenu( true ), m_menuActive( false ), m_menuOwner( -1 ), diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index 5356b78b08..3b1d845a07 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -36,7 +36,22 @@ const int eeschemaSchemaVersion = 0; -EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : APP_SETTINGS_BASE( "eeschema", eeschemaSchemaVersion ) +EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : + APP_SETTINGS_BASE( "eeschema", eeschemaSchemaVersion ), + m_Appearance(), + m_AutoplaceFields(), + m_Drawing(), + m_Input(), + m_PageSettings(), + m_AnnotatePanel(), + m_BomPanel(), + m_FieldEditorPanel(), + m_LibViewPanel(), + m_NetlistPanel(), + m_SymChooserPanel(), + m_Selection(), + m_Simulator(), + m_RescueNeverShow( false ) { m_params.emplace_back( new PARAM( "appearance.edit_component_visible_columns", &m_Appearance.edit_component_visible_columns, "0 1 2 3 4 5 6 7" ) ); diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index b2303f02bb..cf05dbd84e 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -41,6 +41,7 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_TextOffsetRatio( 0.08 ), m_PinSymbolSize( DEFAULT_TEXT_SIZE * IU_PER_MILS / 2 ), m_JunctionSize( DEFAULT_JUNCTION_DIAM * IU_PER_MILS ), + m_SpiceAdjustPassiveValues( false ), m_TemplateFieldNames( nullptr ) { EESCHEMA_SETTINGS* appSettings = dynamic_cast( Kiface().KifaceSettings() ); diff --git a/pcbnew/altium2kicadpcb_plugin/altium_parser_pcb.cpp b/pcbnew/altium2kicadpcb_plugin/altium_parser_pcb.cpp index f1bced6a2f..351eee380b 100644 --- a/pcbnew/altium2kicadpcb_plugin/altium_parser_pcb.cpp +++ b/pcbnew/altium2kicadpcb_plugin/altium_parser_pcb.cpp @@ -484,6 +484,7 @@ ARULE6::ARULE6( ALTIUM_PARSER& aReader ) polygonconnectAirgapwidth = 0; polygonconnectReliefconductorwidth = 0; polygonconnectReliefentries = 0; + polygonconnectStyle = ALTIUM_CONNECT_STYLE::UNKNOWN; aReader.Skip( 2 ); diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index b965eb474e..5f7a7ce96b 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -64,6 +64,7 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() m_FootprintViewer(), m_FootprintWizard(), m_Display(), + m_TrackDragAction( TRACK_DRAG_ACTION::DRAG ), m_Use45DegreeGraphicSegments( false ), m_FlipLeftRight( false ), m_PolarCoords( false ), diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp index b3a48b2e21..5a9ba79e90 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -44,6 +44,7 @@ PAD_TOOL::PAD_TOOL() : PCB_TOOL_BASE( "pcbnew.PadTool" ), m_padCopied( false ), + m_wasHighContrast( false ), m_editPad( niluuid ) {}