diff --git a/libs/kimath/src/geometry/direction_45.cpp b/libs/kimath/src/geometry/direction_45.cpp index 2d7e71b34d..ecd1a91339 100644 --- a/libs/kimath/src/geometry/direction_45.cpp +++ b/libs/kimath/src/geometry/direction_45.cpp @@ -251,7 +251,6 @@ const SHAPE_LINE_CHAIN DIRECTION_45::BuildInitialTrace( const VECTOR2I& aP0, con * * For the length of the radius we use the shorter of the horizontal and vertical distance. */ - SHAPE_ARC arc; if( w == h ) // we only need one arc without a straigth line. { diff --git a/libs/kimath/src/geometry/shape_collisions.cpp b/libs/kimath/src/geometry/shape_collisions.cpp index 604474b0c3..ef3426a68e 100644 --- a/libs/kimath/src/geometry/shape_collisions.cpp +++ b/libs/kimath/src/geometry/shape_collisions.cpp @@ -186,7 +186,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN_BASE& if( aMTV ) { - for( int s = 0; s < aB.GetSegmentCount(); s++ ) + for( size_t s = 0; s < aB.GetSegmentCount(); s++ ) { int dist = aB.GetSegment(s).Distance( aA.GetCenter() ); @@ -251,7 +251,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN_BASE& cmoved.SetCenter( cmoved.GetCenter() + f ); f_total += f; - for( int s = 0; s < aB.GetSegmentCount(); s++ ) + for( size_t s = 0; s < aB.GetSegmentCount(); s++ ) { VECTOR2I f = pushoutForce( cmoved, aB.GetSegment( s ), aClearance ); cmoved.SetCenter( cmoved.GetCenter() + f ); diff --git a/libs/kimath/src/geometry/shape_line_chain.cpp b/libs/kimath/src/geometry/shape_line_chain.cpp index 2239f93581..4ac01f5310 100644 --- a/libs/kimath/src/geometry/shape_line_chain.cpp +++ b/libs/kimath/src/geometry/shape_line_chain.cpp @@ -695,7 +695,7 @@ long long int SHAPE_LINE_CHAIN::Length() const l += CSegment( i ).Length(); } - for( int i = 0; i < ArcCount(); i++ ) + for( size_t i = 0; i < ArcCount(); i++ ) l += CArcs()[i].GetLength(); return l; @@ -746,7 +746,7 @@ void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE // We only process lines in order in this house wxASSERT( aStartIndex <= aEndIndex ); - wxASSERT( aEndIndex < m_points.size() ); + wxASSERT( aEndIndex < static_cast( m_points.size() ) ); SHAPE_LINE_CHAIN newLine = aLine; @@ -989,7 +989,7 @@ int SHAPE_LINE_CHAIN::ShapeCount() const int numShapes = 0; int arcIdx = -1; - for( int i = 0; i < m_points.size() - 1; i++ ) + for( int i = 0; i < static_cast( m_points.size() ) - 1; i++ ) { if( m_shapes[i] == SHAPES_ARE_PT ) {