Fix a few Coverity warnings.

This commit is contained in:
jean-pierre charras 2015-11-11 19:47:51 +01:00
parent 16c2c398e9
commit 34f1c0ea2d
3 changed files with 8 additions and 5 deletions

View File

@ -461,6 +461,7 @@ PNS_ROUTER::PNS_ROUTER()
m_currentEndItem = NULL;
m_snappingEnabled = false;
m_violation = false;
m_gridHelper = NULL;
}

View File

@ -2005,10 +2005,10 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
if( netcode == 0 )
continue;
if( old_netcode != netcode
|| old_width != track->GetWidth()
|| old_layer != track->GetLayer()
|| (path && path->points.back() != mapPt(track->GetStart()) )
if( old_netcode != netcode ||
old_width != track->GetWidth() ||
old_layer != track->GetLayer() ||
(path && path->points.back() != mapPt(track->GetStart()) )
)
{
old_width = track->GetWidth();
@ -2042,7 +2042,8 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
path->AppendPoint( mapPt( track->GetStart() ) );
}
path->AppendPoint( mapPt( track->GetEnd() ) );
if( path ) // Should not occur
path->AppendPoint( mapPt( track->GetEnd() ) );
}
}

View File

@ -183,6 +183,7 @@ PolyNode::PolyNode(): Childs(), Parent(0), Index(0), m_IsOpen(false)
{
// Avoid uninitialized vars
m_endtype = etClosedPolygon;
m_jointype = jtSquare;
}
//------------------------------------------------------------------------------