diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp
index 09f1f6420d..3d5155f843 100644
--- a/pcbnew/exporters/export_d356.cpp
+++ b/pcbnew/exporters/export_d356.cpp
@@ -395,7 +395,7 @@ void PCB_EDIT_FRAME::GenD356File( wxCommandEvent& aEvent )
     if( dlg.ShowModal() == wxID_CANCEL )
         return;
 
-    IPC356D_WRITER writer( GetBoard(), this );
+    IPC356D_WRITER writer( GetBoard() );
 
     bool success = writer.Write( dlg.GetPath() );
 
diff --git a/pcbnew/exporters/export_d356.h b/pcbnew/exporters/export_d356.h
index 900bef4e2f..172b0f0ac1 100644
--- a/pcbnew/exporters/export_d356.h
+++ b/pcbnew/exporters/export_d356.h
@@ -58,9 +58,7 @@ public:
      * @param aPcb is the board to extract a netlist from
      * @param aParent will be used as the parent for any warning dialogs
      */
-    IPC356D_WRITER( BOARD* aPcb, wxWindow* aParent = nullptr ) :
-            m_pcb( aPcb ), m_parent( aParent )
-    {}
+    IPC356D_WRITER( BOARD* aPcb ) : m_pcb( aPcb ) {}
 
     virtual ~IPC356D_WRITER() {}
 
@@ -72,8 +70,7 @@ public:
     bool Write( const wxString& aFilename );
 
 private:
-    BOARD*    m_pcb;
-    wxWindow* m_parent;
+    BOARD* m_pcb;
 
     /// Writes a list of records to the given output stream
     void write_D356_records( std::vector<D356_RECORD> &aRecords, FILE* aFile );
diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp
index 1f1a8a56f1..d46d0aeae6 100644
--- a/pcbnew/pcb_painter.cpp
+++ b/pcbnew/pcb_painter.cpp
@@ -2483,9 +2483,6 @@ void PCB_PAINTER::draw( const PCB_TABLE* aTable, int aLayer )
     for( PCB_TABLECELL* cell : aTable->GetCells() )
         draw( static_cast<PCB_TEXTBOX*>( cell ), aLayer );
 
-    VECTOR2I  pos = aTable->GetPosition();
-    VECTOR2I  end = aTable->GetEnd();
-
     // Selection for tables is done with a background wash, so pass in nullptr to GetColor()
     // so we just get the "normal" (un-selected/un-brightened) color for the borders.
     COLOR4D    color = m_pcbSettings.GetColor( nullptr, aLayer );
@@ -2532,20 +2529,6 @@ void PCB_PAINTER::draw( const PCB_TABLE* aTable, int aLayer )
                 }
             };
 
-    auto strokeRect =
-            [&]( VECTOR2I ptA, VECTOR2I ptB )
-            {
-                if( lineStyle <= LINE_STYLE::FIRST_TYPE )
-                {
-                    m_gal->DrawRectangle( ptA, ptB );
-                }
-                else
-                {
-                    SHAPE_RECT rect( BOX2I( ptA, ptB - ptA ) );
-                    strokeShape( rect );
-                }
-            };
-
     if( aTable->GetSeparatorsStroke().GetWidth() >= 0 )
     {
         setupStroke( aTable->GetSeparatorsStroke() );