From f67c7fe052d1d8e98838b7aef1681c2f4949dff6 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 25 Aug 2015 16:47:09 +0200 Subject: [PATCH] Very minor changes. ( changes in clipper are made to avoid coverity minor warnings). --- pcbnew/pcbframe.cpp | 5 ++--- polygon/clipper.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index c5d5be76c6..16ba1a033b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -980,14 +980,13 @@ void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { wxWindow * pythonPanelFrame = findPythonConsole(); - bool pythonPanelShown = false; + bool pythonPanelShown = true; if( pythonPanelFrame == NULL ) pythonPanelFrame = new PYTHON_CONSOLE_FRAME( this, pythonConsoleNameId() ); else - pythonPanelShown = pythonPanelFrame->IsShown(); + pythonPanelShown = ! pythonPanelFrame->IsShown(); - pythonPanelShown = ! pythonPanelShown; pythonPanelFrame->Show( pythonPanelShown ); } diff --git a/polygon/clipper.cpp b/polygon/clipper.cpp index 6022853c95..5c2d046953 100644 --- a/polygon/clipper.cpp +++ b/polygon/clipper.cpp @@ -879,6 +879,9 @@ ClipperBase::ClipperBase() //constructor { m_CurrentLM = m_MinimaList.begin(); //begin() == end() here m_UseFullRange = false; + + //Clear vars to make coverity happy: + m_PreserveCollinear = m_HasOpenPaths = false; } //------------------------------------------------------------------------------ @@ -3624,6 +3627,9 @@ ClipperOffset::ClipperOffset(double miterLimit, double arcTolerance) this->MiterLimit = miterLimit; this->ArcTolerance = arcTolerance; m_lowest.X = -1; + + //Clear temp vars to make coverity happy. + m_delta = m_sinA = m_sin = m_cos = m_miterLim = m_StepsPerRad = 0.0; } //------------------------------------------------------------------------------