Browse Source

Some coverity fixes

pull/5/merge
Mark Roszko 8 years ago
committed by Chris Pavlina
parent
commit
b98cc0b937
  1. 1
      3d-viewer/3d_rendering/3d_render_ogl_legacy/c_ogl_3dmodel.cpp
  2. 3
      common/gal/opengl/opengl_gal.cpp
  3. 3
      eeschema/cmp_tree_model.cpp
  4. 2
      eeschema/lib_manager.cpp
  5. 3
      eeschema/sch_screen.cpp
  6. 3
      eeschema/sim/sim_plot_frame.cpp
  7. 2
      gerbview/gerbview_painter.cpp
  8. 2
      gerbview/gerbview_painter.h
  9. 2
      include/class_eda_rect.h
  10. 3
      include/eagle_parser.h
  11. 2
      include/preview_items/arc_geom_manager.h
  12. 3
      include/tool/coroutine.h
  13. 1
      pcbnew/connectivity_data.cpp
  14. 2
      pcbnew/footprint_info_impl.cpp
  15. 1
      pcbnew/import_dxf/dxf2brd_items.cpp

1
3d-viewer/3d_rendering/3d_render_ogl_legacy/c_ogl_3dmodel.cpp

@ -37,6 +37,7 @@
C_OGL_3DMODEL::C_OGL_3DMODEL( const S3DMODEL &a3DModel,
MATERIAL_MODE aMaterialMode )
{
m_ogl_idx_list_meshes = 0;
m_ogl_idx_list_opaque = 0;
m_ogl_idx_list_transparent = 0;
m_nr_meshes = 0;

3
common/gal/opengl/opengl_gal.cpp

@ -71,7 +71,7 @@ OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
HIDPI_GL_CANVAS( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize,
wxEXPAND, aName ),
mouseListener( aMouseListener ), paintListener( aPaintListener ), currentManager( nullptr ),
cachedManager( nullptr ), nonCachedManager( nullptr ), overlayManager( nullptr )
cachedManager( nullptr ), nonCachedManager( nullptr ), overlayManager( nullptr ), mainBuffer( 0 ), overlayBuffer( 0 )
{
if( glMainContext == NULL )
{
@ -1583,6 +1583,7 @@ int OPENGL_GAL::drawBitmapChar( unsigned long aChar )
if( aChar == ' ' )
{
const FONT_GLYPH_TYPE* g = LookupGlyph( 'x' );
wxASSERT( g );
Translate( VECTOR2D( g->advance, 0 ) );
return g->advance;
}

3
eeschema/cmp_tree_model.cpp

@ -107,7 +107,8 @@ CMP_TREE_NODE::CMP_TREE_NODE()
Type( INVALID ),
IntrinsicRank( 0 ),
Score( kLowestDefaultScore ),
Unit( 0 )
Unit( 0 ),
IsRoot( false )
{}

2
eeschema/lib_manager.cpp

@ -35,7 +35,7 @@
LIB_MANAGER::LIB_MANAGER( LIB_EDIT_FRAME& aFrame )
: m_frame( aFrame ), m_symbolTable( aFrame.Prj().SchSymbolLibTable() )
: m_frame( aFrame ), m_symbolTable( aFrame.Prj().SchSymbolLibTable() ), m_syncHash( 0 )
{
m_adapter = LIB_MANAGER_ADAPTER::Create( this );
m_adapter->ShowUnits( false );

3
eeschema/sch_screen.cpp

@ -1462,6 +1462,7 @@ bool SCH_SCREENS::HasNoFullyDefinedLibIds()
cnt += 1;
symbol = dynamic_cast< SCH_COMPONENT* >( item );
wxASSERT( symbol );
if( !symbol->GetLibId().GetLibNickname().empty() )
return false;
@ -1493,6 +1494,7 @@ size_t SCH_SCREENS::GetLibNicknames( wxArrayString& aLibNicknames )
continue;
symbol = dynamic_cast< SCH_COMPONENT* >( item );
wxASSERT( symbol );
nickname = symbol->GetLibId().GetLibNickname();
@ -1523,6 +1525,7 @@ int SCH_SCREENS::ChangeSymbolLibNickname( const wxString& aFrom, const wxString&
continue;
symbol = dynamic_cast< SCH_COMPONENT* >( item );
wxASSERT( symbol );
if( symbol->GetLibId().GetLibNickname() != aFrom )
continue;

3
eeschema/sim/sim_plot_frame.cpp

@ -905,8 +905,7 @@ void SIM_PLOT_FRAME::menuShowGridUpdate( wxUpdateUIEvent& event )
{
SIM_PLOT_PANEL* plot = CurrentPlot();
if( plot )
event.Check( plot ? plot->IsGridShown() : false );
event.Check( plot ? plot->IsGridShown() : false );
}

2
gerbview/gerbview_painter.cpp

@ -383,7 +383,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
void GERBVIEW_PAINTER::drawPolygon( GERBER_DRAW_ITEM* aParent,
SHAPE_POLY_SET aPolygon,
SHAPE_POLY_SET& aPolygon,
bool aFilled )
{
for( auto it = aPolygon.Iterate( 0 ); it; ++it )

2
gerbview/gerbview_painter.h

@ -181,7 +181,7 @@ protected:
void draw( /*const*/ GERBER_DRAW_ITEM* aVia, int aLayer );
/// Helper routine to draw a polygon
void drawPolygon( GERBER_DRAW_ITEM* aParent, SHAPE_POLY_SET aPolygon, bool aFilled );
void drawPolygon( GERBER_DRAW_ITEM* aParent, SHAPE_POLY_SET& aPolygon, bool aFilled );
/// Helper to draw a flashed shape (aka spot)
void drawFlashedShape( GERBER_DRAW_ITEM* aItem, bool aFilled );

2
include/class_eda_rect.h

@ -55,6 +55,8 @@ public:
m_Size( aSize )
{ }
virtual ~EDA_RECT() { };
wxPoint Centre() const
{
return wxPoint( m_Pos.x + ( m_Size.x >> 1 ),

3
include/eagle_parser.h

@ -199,7 +199,8 @@ public:
* construct a default OPTIONAL_XML_ATTRIBUTE, whose data is not available.
*/
OPTIONAL_XML_ATTRIBUTE() :
m_isAvailable( false )
m_isAvailable( false ),
m_data( T() )
{}
/**

2
include/preview_items/arc_geom_manager.h

@ -135,7 +135,7 @@ private:
/*
* construction parameters
*/
bool m_angleSnap;
bool m_angleSnap = false;
};
} // PREVIEW
} // KIGFX

3
include/tool/coroutine.h

@ -136,7 +136,8 @@ public:
m_running( false ),
m_args( 0 ),
m_callee( nullptr ),
m_retVal( 0 )
m_retVal( 0 ),
m_callContext( nullptr )
{
}

1
pcbnew/connectivity_data.cpp

@ -36,6 +36,7 @@
CONNECTIVITY_DATA::CONNECTIVITY_DATA()
{
m_connAlgo.reset( new CN_CONNECTIVITY_ALGO );
m_progressReporter = nullptr;
}

2
pcbnew/footprint_info_impl.cpp

@ -244,7 +244,7 @@ size_t FOOTPRINT_LIST_IMPL::CountFinished()
}
FOOTPRINT_LIST_IMPL::FOOTPRINT_LIST_IMPL() : m_loader( nullptr )
FOOTPRINT_LIST_IMPL::FOOTPRINT_LIST_IMPL() : m_loader( nullptr ), m_first_to_finish( false ), m_count_finished( 0 )
{
}

1
pcbnew/import_dxf/dxf2brd_items.cpp

@ -60,6 +60,7 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface()
m_yOffset = 0.0; // Y coord offset for conversion (in mm)
m_DXF2mm = 1.0; // The scale factor to convert DXF units to mm
m_version = 0; // the dxf version, not yet used
m_defaultThickness = 0.2; // default thickness (in mm)
m_brdLayer = Dwgs_User; // The default import layer
m_importAsfootprintGraphicItems = true;
}

Loading…
Cancel
Save