fix compil and Coverity warnings.

This commit is contained in:
jean-pierre charras 2023-03-12 14:15:38 +01:00
parent 99247adf15
commit e6945a85b0
4 changed files with 8 additions and 5 deletions

View File

@ -51,7 +51,7 @@ const SHAPE_LINE_CHAIN DIRECTION_45::BuildInitialTrace( const VECTOR2I& aP0, con
}
VECTOR2I mp0, mp1;
int tangentLength;
int tangentLength = 0;
if( is90mode )
{

View File

@ -1550,9 +1550,6 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS&
is.is_corner_our = false;
is.is_corner_their = false;
int distA = ( b.A - *p ).EuclideanNorm();
int distB = ( b.B - *p ).EuclideanNorm();
if( p == a.A )
{
is.is_corner_our = true;

View File

@ -382,7 +382,7 @@ void DIALOG_COPPER_ZONE::readNetInformation()
for( NETINFO_ITEM* net : netInfoList )
{
const int& netCode = net->GetNetCode();
const int netCode = net->GetNetCode();
const wxString& netName = getUnescapedNetName( net );
m_netNameToNetCode[netName] = netCode;

View File

@ -154,7 +154,9 @@ bool primitiveNeedsUpdate( const std::shared_ptr<PCB_SHAPE>& a,
TEST( a->GetPolyShape().TotalVertices(), b->GetPolyShape().TotalVertices(), wxEmptyString);
for( int ii = 0; ii < a->GetPolyShape().TotalVertices(); ++ii )
{
TEST( a->GetPolyShape().CVertex( ii ), b->GetPolyShape().CVertex( ii ), wxEmptyString );
}
break;
@ -301,7 +303,9 @@ bool shapeNeedsUpdate( const FP_SHAPE* a, const FP_SHAPE* b )
TEST( a->GetPolyShape().TotalVertices(), b->GetPolyShape().TotalVertices(), wxEmptyString );
for( int ii = 0; ii < a->GetPolyShape().TotalVertices(); ++ii )
{
TEST( a->GetPolyShape().CVertex( ii ), b->GetPolyShape().CVertex( ii ), wxEmptyString );
}
break;
@ -397,7 +401,9 @@ bool zonesNeedUpdate( const FP_ZONE* a, const FP_ZONE* b )
bPoly.Move( parentFootprint->GetPosition() );
for( int ii = 0; ii < a->Outline()->TotalVertices(); ++ii )
{
TEST( aPoly.CVertex( ii ), bPoly.CVertex( ii ) , wxEmptyString);
}
return diff;
}