Browse Source

Fix a few minor Coverity warnings

pull/5/merge
jean-pierre charras 8 years ago
parent
commit
4012aa70da
  1. 3
      common/convert_basic_shapes_to_polygon.cpp
  2. 3
      eeschema/dialogs/dialog_choose_component.cpp
  3. 1
      include/geometry/shape_arc.h
  4. 2
      include/geometry/shape_poly_set.h
  5. 2
      pcbnew/zone_filler.cpp

3
common/convert_basic_shapes_to_polygon.cpp

@ -102,7 +102,7 @@ void TransformOvalClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
double delta_angle = atan2( (double)endp.y, (double)endp.x );
int seg_len = KiROUND( EuclideanNorm( endp ) );
double delta = 3600 / aCircleToSegmentsCount; // rot angle in 0.1 degree
double delta = 3600.0 / aCircleToSegmentsCount; // rot angle in 0.1 degree
// Compute the outlines of the segment, and creates a polygon
// Note: the polygonal shape is built from the equivalent horizontal
@ -163,7 +163,6 @@ void TransformOvalClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
polyshape.Rotate( delta_angle, VECTOR2I( 0, 0 ) );
polyshape.Move( startp );
aCornerBuffer.Append( polyshape);
}

3
eeschema/dialogs/dialog_choose_component.cpp

@ -483,9 +483,6 @@ void DIALOG_CHOOSE_COMPONENT::RenderPreview( LIB_PART* aComponent, int aUnit )
dc.SetBackground( wxBrush( bgColor.ToColour() ) );
dc.Clear();
if( !aComponent )
return;
int unit = aUnit > 0 ? aUnit : 1;
int convert = m_deMorganConvert > 0 ? m_deMorganConvert : 1;

1
include/geometry/shape_arc.h

@ -45,6 +45,7 @@ public:
m_p0 = aOther.m_p0;
m_p1 = aOther.m_p1;
m_pc = aOther.m_pc;
m_width = aOther.m_width;
}
~SHAPE_ARC() {};

2
include/geometry/shape_poly_set.h

@ -67,7 +67,7 @@ class SHAPE_POLY_SET : public SHAPE
public:
struct TRI
{
TRI()
TRI() : a(0), b(0), c(0)
{
}

2
pcbnew/zone_filler.cpp

@ -64,7 +64,7 @@ static double s_thermalRot = 450; // angle of stubs in thermal reliefs for ro
static const bool s_DumpZonesWhenFilling = false;
ZONE_FILLER::ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit ) :
m_board( aBoard ), m_commit( aCommit ), m_progressReporter( nullptr )
m_board( aBoard ), m_commit( aCommit ), m_progressReporter( nullptr ), m_count_done( 0 )
{
}

Loading…
Cancel
Save