Add missing initialization values to variables
Flagged by Coverity.
This commit is contained in:
parent
9e6446a8dc
commit
0e9cfd0af2
|
@ -28,6 +28,8 @@ using namespace KIGFX;
|
||||||
|
|
||||||
RENDER_SETTINGS::RENDER_SETTINGS() :
|
RENDER_SETTINGS::RENDER_SETTINGS() :
|
||||||
m_highlightNetcodes(),
|
m_highlightNetcodes(),
|
||||||
|
m_dashLengthRatio( 12 ), // From ISO 128-2
|
||||||
|
m_gapLengthRatio( 3 ), // From ISO 128-2
|
||||||
m_printDC( nullptr )
|
m_printDC( nullptr )
|
||||||
{
|
{
|
||||||
// Set the default initial values
|
// Set the default initial values
|
||||||
|
|
|
@ -53,7 +53,9 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
|
||||||
m_Graphics(),
|
m_Graphics(),
|
||||||
m_Session(),
|
m_Session(),
|
||||||
m_System(),
|
m_System(),
|
||||||
m_NetclassPanel()
|
m_DoNotShowAgain(),
|
||||||
|
m_NetclassPanel(),
|
||||||
|
m_PackageManager()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Automatic dark mode detection works fine on Mac.
|
* Automatic dark mode detection works fine on Mac.
|
||||||
|
|
|
@ -36,8 +36,8 @@ void STROKE_PARAMS::Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int
|
||||||
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
||||||
std::function<void( const wxPoint& a, const wxPoint& b )> aStroker )
|
std::function<void( const wxPoint& a, const wxPoint& b )> aStroker )
|
||||||
{
|
{
|
||||||
double strokes[6];
|
double strokes[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
|
||||||
int wrapAround;
|
int wrapAround = 0;
|
||||||
|
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,9 +81,9 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter ) const
|
||||||
{
|
{
|
||||||
int pen_size = std::max( GetPenWidth(), aPlotter->RenderSettings()->GetMinPenWidth() );
|
int pen_size = std::max( GetPenWidth(), aPlotter->RenderSettings()->GetMinPenWidth() );
|
||||||
wxPoint center;
|
wxPoint center;
|
||||||
int radius;
|
int radius = 0;
|
||||||
int startAngle;
|
int startAngle = 0;
|
||||||
int endAngle;
|
int endAngle = 0;
|
||||||
|
|
||||||
static std::vector<wxPoint> cornerList;
|
static std::vector<wxPoint> cornerList;
|
||||||
|
|
||||||
|
|
|
@ -612,7 +612,10 @@ void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
|
||||||
|
|
||||||
|
|
||||||
SCH_LABEL_BASE::SCH_LABEL_BASE( const wxPoint& aPos, const wxString& aText, KICAD_T aType ) :
|
SCH_LABEL_BASE::SCH_LABEL_BASE( const wxPoint& aPos, const wxString& aText, KICAD_T aType ) :
|
||||||
SCH_TEXT( aPos, aText, aType )
|
SCH_TEXT( aPos, aText, aType ),
|
||||||
|
m_shape( L_UNSPECIFIED ),
|
||||||
|
m_connectionType( CONNECTION_TYPE::NONE ),
|
||||||
|
m_isDangling( true )
|
||||||
{
|
{
|
||||||
SetMultilineAllowed( false );
|
SetMultilineAllowed( false );
|
||||||
SetFieldsAutoplaced();
|
SetFieldsAutoplaced();
|
||||||
|
|
|
@ -40,6 +40,8 @@ public:
|
||||||
// Angle type must be explicitly specified at creation, because
|
// Angle type must be explicitly specified at creation, because
|
||||||
// there is no other way of knowing what an int or a double represents
|
// there is no other way of knowing what an int or a double represents
|
||||||
EDA_ANGLE( int aValue, ANGLE_TYPE aAngleType ) :
|
EDA_ANGLE( int aValue, ANGLE_TYPE aAngleType ) :
|
||||||
|
m_value( 0 ),
|
||||||
|
m_radians( 0.0 ),
|
||||||
m_initial_type( aAngleType )
|
m_initial_type( aAngleType )
|
||||||
{
|
{
|
||||||
switch( aAngleType )
|
switch( aAngleType )
|
||||||
|
@ -55,6 +57,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
EDA_ANGLE( double aValue, ANGLE_TYPE aAngleType ) :
|
EDA_ANGLE( double aValue, ANGLE_TYPE aAngleType ) :
|
||||||
|
m_value( 0 ),
|
||||||
|
m_radians( 0.0 ),
|
||||||
m_initial_type( aAngleType )
|
m_initial_type( aAngleType )
|
||||||
{
|
{
|
||||||
switch( aAngleType )
|
switch( aAngleType )
|
||||||
|
|
|
@ -60,6 +60,7 @@ public:
|
||||||
m_pos = (wxPoint) aBox.GetPosition();
|
m_pos = (wxPoint) aBox.GetPosition();
|
||||||
m_size.x = aBox.GetWidth();
|
m_size.x = aBox.GetWidth();
|
||||||
m_size.y = aBox.GetHeight();
|
m_size.y = aBox.GetHeight();
|
||||||
|
m_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~EDA_RECT() { };
|
virtual ~EDA_RECT() { };
|
||||||
|
|
|
@ -501,7 +501,7 @@ void PCB_EDIT_FRAME::ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew,
|
||||||
bool* aUpdated )
|
bool* aUpdated )
|
||||||
{
|
{
|
||||||
PCB_GROUP* parentGroup = aExisting->GetParentGroup();
|
PCB_GROUP* parentGroup = aExisting->GetParentGroup();
|
||||||
bool dummyBool;
|
bool dummyBool = false;
|
||||||
|
|
||||||
if( !aUpdated )
|
if( !aUpdated )
|
||||||
aUpdated = &dummyBool;
|
aUpdated = &dummyBool;
|
||||||
|
|
|
@ -47,6 +47,9 @@ class DRC_TEST_PROVIDER_SOLDER_MASK : public ::DRC_TEST_PROVIDER
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DRC_TEST_PROVIDER_SOLDER_MASK ():
|
DRC_TEST_PROVIDER_SOLDER_MASK ():
|
||||||
|
m_board( nullptr ),
|
||||||
|
m_webWidth( 0 ),
|
||||||
|
m_maxError( 0 ),
|
||||||
m_largestClearance( 0 )
|
m_largestClearance( 0 )
|
||||||
{
|
{
|
||||||
m_bridgeRule.m_Name = _( "board setup solder mask min width" );
|
m_bridgeRule.m_Name = _( "board setup solder mask min width" );
|
||||||
|
|
|
@ -44,6 +44,7 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
|
||||||
m_Display(),
|
m_Display(),
|
||||||
m_UserGrid(),
|
m_UserGrid(),
|
||||||
m_PolarCoords( false ),
|
m_PolarCoords( false ),
|
||||||
|
m_RotationAngle( 900 ),
|
||||||
m_Use45Limit( true ),
|
m_Use45Limit( true ),
|
||||||
m_LibWidth( 250 ),
|
m_LibWidth( 250 ),
|
||||||
m_LastImportExportPath(),
|
m_LastImportExportPath(),
|
||||||
|
|
|
@ -52,6 +52,7 @@ LINE_PLACER::LINE_PLACER( ROUTER* aRouter ) :
|
||||||
m_currentNet = 0;
|
m_currentNet = 0;
|
||||||
m_currentLayer = 0;
|
m_currentLayer = 0;
|
||||||
m_startItem = nullptr;
|
m_startItem = nullptr;
|
||||||
|
m_endItem = nullptr;
|
||||||
m_chainedPlacement = false;
|
m_chainedPlacement = false;
|
||||||
m_orthoMode = false;
|
m_orthoMode = false;
|
||||||
m_placementCorrect = false;
|
m_placementCorrect = false;
|
||||||
|
|
Loading…
Reference in New Issue