From a9fbedfb120e89bc09c6ecab3f15b891e3fb2ead Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 30 Dec 2016 14:36:23 +0100 Subject: [PATCH] More Coverity warnings fixes. --- common/widgets/mathplot.cpp | 3 +++ include/widgets/mathplot.h | 4 +++- pcbnew/class_board.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/widgets/mathplot.cpp b/common/widgets/mathplot.cpp index 1e258f0b36..6ad1057e19 100644 --- a/common/widgets/mathplot.cpp +++ b/common/widgets/mathplot.cpp @@ -605,6 +605,9 @@ mpFXY::mpFXY( wxString name, int flags ) m_type = mpLAYER_PLOT; m_scaleX = NULL; m_scaleY = NULL; + + // Avoid not initialized members: + maxDrawX = minDrawX = maxDrawY = minDrawY = 0; } diff --git a/include/widgets/mathplot.h b/include/widgets/mathplot.h index aa3fa647ad..4592e1f88e 100644 --- a/include/widgets/mathplot.h +++ b/include/widgets/mathplot.h @@ -770,7 +770,9 @@ public: struct TickLabel { TickLabel( double pos_ = 0.0, const wxString& label_ = wxT("") ) : - pos( pos_ ), label( label_ ) {}; + pos( pos_ ), label( label_ ), pixelPos( 0 ), visible( true ) + {} + double pos; wxString label; int pixelPos; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index a5372e11cf..6608c3ce07 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -238,7 +238,7 @@ static int find_vias_and_tracks_at( TRACKS& at_next, TRACKS& in_net, LSET& lset, { lset |= t->GetLayerSet(); at_next.push_back( t ); - in_net.erase( it ); + it = in_net.erase( it ); } else ++it;