fix a few minor Coverity warnings.

This commit is contained in:
jean-pierre charras 2020-04-10 18:28:12 +02:00
parent 9e656fe5eb
commit dac78d2562
2 changed files with 10 additions and 3 deletions

View File

@ -63,6 +63,7 @@ using namespace TSCHEMATIC_T;
SCH_SEXPR_PARSER::SCH_SEXPR_PARSER( LINE_READER* aLineReader ) :
SCHEMATIC_LEXER( aLineReader ),
m_requiredVersion( 0 ),
m_fieldId( 0 ),
m_unit( 1 ),
m_convert( 1 )
{
@ -1801,7 +1802,7 @@ void SCH_SEXPR_PARSER::parseSchSymbolInstances( std::unique_ptr<SCH_COMPONENT>&
{
NeedSYMBOL();
int unit;
int unit = 1;
wxString reference;
KIID_PATH path( FromUTF8() );
@ -1932,7 +1933,7 @@ SCH_COMPONENT* SCH_SEXPR_PARSER::parseSchematicSymbol()
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a symbol." ) );
T token;
int orientation;
int orientation = CMP_ORIENT_0;
wxString tmp;
SCH_FIELD* field;
std::unique_ptr<SCH_COMPONENT> symbol( new SCH_COMPONENT() );

View File

@ -130,7 +130,7 @@ ALTIUM_LAYER altium_layer_from_name( const wxString& aName )
if( it == hash_map.end() )
{
wxLogError( wxString::Format(
_( "Unknown mapping of the Altium layer '%s'. Please report as issue." ), aName ) );
"Unknown mapping of the Altium layer '%s'. Please report as issue.", aName ) );
return ALTIUM_LAYER::UNKNOWN;
}
else
@ -450,6 +450,12 @@ APOLYGON6::APOLYGON6( ALTIUM_PARSER& aReader )
ARULE6::ARULE6( ALTIUM_PARSER& aReader )
{
// Initalize all variables and make Coverity happy
planeclearanceClearance = 0;
polygonconnectAirgapwidth = 0;
polygonconnectReliefconductorwidth = 0;
polygonconnectReliefentries = 0;
aReader.Skip( 2 );
std::map<wxString, wxString> properties = aReader.ReadProperties();