From 9e3e4ae9a64bc38480c883a1f6939e394911ecd3 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 16 Aug 2022 18:54:20 +0200 Subject: [PATCH] Fix minor Coverity warnings --- eeschema/sch_plugins/altium/altium_parser_sch.cpp | 7 ++++++- eeschema/sch_plugins/altium/sch_altium_plugin.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/eeschema/sch_plugins/altium/altium_parser_sch.cpp b/eeschema/sch_plugins/altium/altium_parser_sch.cpp index 6dc542e48e..a15c5011d4 100644 --- a/eeschema/sch_plugins/altium/altium_parser_sch.cpp +++ b/eeschema/sch_plugins/altium/altium_parser_sch.cpp @@ -452,6 +452,10 @@ ASCH_HARNESS_CONNECTOR::ASCH_HARNESS_CONNECTOR( const std::map& aPro AreaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 ); TextColor = ALTIUM_PARSER::ReadInt( aProps, "TEXTCOLOR", 0 ); TextFontID = ALTIUM_PARSER::ReadInt( aProps, "TEXTFONTID", 0 ); + TextStyle = 0; } @@ -712,7 +717,7 @@ ASCH_SHEET_FONT::ASCH_SHEET_FONT( const std::map& aProps, in Italic = ALTIUM_PARSER::ReadBool( aProps, "ITALIC" + sid, false ); Bold = ALTIUM_PARSER::ReadBool( aProps, "BOLD" + sid, false ); Underline = ALTIUM_PARSER::ReadBool( aProps, "UNDERLINE" + sid, false ); - + AreaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR" + sid, 0 ); } diff --git a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp index 5ff9f0d311..962f01f573 100644 --- a/eeschema/sch_plugins/altium/sch_altium_plugin.cpp +++ b/eeschema/sch_plugins/altium/sch_altium_plugin.cpp @@ -130,6 +130,8 @@ SCH_ALTIUM_PLUGIN::SCH_ALTIUM_PLUGIN() m_rootSheet = nullptr; m_currentSheet = nullptr; m_schematic = nullptr; + m_harnessOwnerIndexOffset = 0; + m_harnessEntryParent = 0; m_reporter = &WXLOG_REPORTER::GetInstance(); } @@ -383,7 +385,7 @@ void SCH_ALTIUM_PLUGIN::ParseAdditional( const ALTIUM_COMPOUND_FILE& aAltiumSchF ParseHarnessEntry( properties ); break; case ALTIUM_SCH_RECORD::HARNESS_TYPE: - ParseHarnessType( properties ); + ParseHarnessType( properties ); break; case ALTIUM_SCH_RECORD::SIGNAL_HARNESS: ParseSignalHarness( properties ); @@ -2169,9 +2171,9 @@ void SCH_ALTIUM_PLUGIN::ParsePort( const ASCH_PORT& aElem ) //{ // label = new SCH_HIERLABEL( elem.location + m_sheetOffset, elem.name ); //} - + label = new SCH_GLOBALLABEL( position, aElem.Name ); - + switch( aElem.IOtype ) { default: