diff --git a/common/kicad_curl/kicad_curl_easy.cpp b/common/kicad_curl/kicad_curl_easy.cpp
index d653069075..6107f59c47 100644
--- a/common/kicad_curl/kicad_curl_easy.cpp
+++ b/common/kicad_curl/kicad_curl_easy.cpp
@@ -235,7 +235,7 @@ bool KICAD_CURL_EASY::SetPostFields(
 {
     std::string postfields;
 
-    for( int i = 0; i < aFields.size(); i++ )
+    for( size_t i = 0; i < aFields.size(); i++ )
     {
         if( i > 0 )
             postfields += "&";
diff --git a/eeschema/lib_shape.cpp b/eeschema/lib_shape.cpp
index 0a3caee5b0..4be9b8f509 100644
--- a/eeschema/lib_shape.cpp
+++ b/eeschema/lib_shape.cpp
@@ -222,10 +222,6 @@ void LIB_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffs
     {
     case SHAPE_T::ARC:
     {
-        // In some plotters (not all) the arc is approximated by segments, and
-        // a error max is needed. We try to approximate by 360/5 segments by 360 deg
-        int arc2segment_error = CircleToEndSegmentDeltaRadius( GetRadius(), 360/5 );
-
         VECTOR2I mid = aTransform.TransformCoordinate( GetArcMid() ) + aOffset;
         VECTOR2I center = CalcArcCenter( start, mid, end );
 
diff --git a/pcbnew/plugins/legacy/legacy_plugin.cpp b/pcbnew/plugins/legacy/legacy_plugin.cpp
index 3156dadbf3..5f3bd5863c 100644
--- a/pcbnew/plugins/legacy/legacy_plugin.cpp
+++ b/pcbnew/plugins/legacy/legacy_plugin.cpp
@@ -2320,7 +2320,6 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
 
     ZONE_BORDER_DISPLAY_STYLE outline_hatch = ZONE_BORDER_DISPLAY_STYLE::NO_HATCH;
     bool    endContour = false;
-    bool    segmentFill = false;
     int     holeIndex = -1;     // -1 is the main outline; holeIndex >= 0 = hole index
     char    buf[1024];
     char*   line;
@@ -2456,8 +2455,6 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
 
             if( fillmode)
             {
-                segmentFill = true;
-
                 if( m_showLegacySegmentZoneWarning )
                 {
                     wxLogWarning( _( "The legacy segment zone fill mode is no longer supported.\n"
@@ -2466,10 +2463,6 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
                     m_showLegacySegmentZoneWarning = false;
                 }
             }
-            else
-            {
-                segmentFill = false;
-            }
 
             zc->SetFillMode( ZONE_FILL_MODE::POLYGONS );
             zc->SetIsFilled( fillstate == 'S' );