Fix some coverity warnings (mainly not initialized members)
This commit is contained in:
parent
35c23f3135
commit
6e8a8a6b25
|
@ -36,6 +36,10 @@ using namespace KIGFX;
|
|||
CAIRO_COMPOSITOR::CAIRO_COMPOSITOR( cairo_t** aMainContext ) :
|
||||
m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext )
|
||||
{
|
||||
// Do not have uninitialized members:
|
||||
cairo_matrix_init_identity( &m_matrix );
|
||||
m_stride = 0;
|
||||
m_bufferSize = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,8 +48,10 @@ GAL::GAL() :
|
|||
SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers
|
||||
SetScreenDPI( 106 ); // Display resolution setting
|
||||
SetDepthRange( VECTOR2D( GAL::MIN_DEPTH, GAL::MAX_DEPTH ) );
|
||||
SetLayerDepth( 0.0 );
|
||||
SetFlip( false, false );
|
||||
SetLineWidth( 1.0 );
|
||||
ComputeWorldScale();
|
||||
|
||||
// Set grid defaults
|
||||
SetGridVisibility( true );
|
||||
|
|
|
@ -47,6 +47,11 @@ CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) :
|
|||
{
|
||||
// In the beginning there is only free space
|
||||
m_freeChunks.insert( CHUNK( aSize, 0 ) );
|
||||
|
||||
// Do not have uninitialized members:
|
||||
m_chunkSize = 0;
|
||||
m_chunkOffset = 0;
|
||||
m_itemSize = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,10 @@ SHADER::SHADER() :
|
|||
maximumVertices( 4 ),
|
||||
geomInputType( GL_LINES ),
|
||||
geomOutputType( GL_LINES )
|
||||
|
||||
{
|
||||
// Do not have uninitialized members:
|
||||
programNumber = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB(
|
|||
{
|
||||
m_parent = aParent;
|
||||
m_libEntry = aLibEntry;
|
||||
m_skipCopyFromPanel = false;
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Centre();
|
||||
|
|
|
@ -59,6 +59,14 @@ public:
|
|||
{
|
||||
m_parent = aParent;
|
||||
SetTitle( aTitle );
|
||||
|
||||
// Avoid not initialized members:
|
||||
m_textshape = 0;
|
||||
m_textsize = 0;
|
||||
m_textorient = 0;
|
||||
m_textHjustify = GR_TEXT_HJUSTIFY_CENTER;
|
||||
m_textVjustify = GR_TEXT_VJUSTIFY_CENTER;
|
||||
m_text_invisible = false;
|
||||
}
|
||||
|
||||
// ~DIALOG_EDIT_ONE_FIELD() {};
|
||||
|
|
|
@ -1403,7 +1403,7 @@ bool dxfRW::writeDimension( DRW_Dimension* ent )
|
|||
|
||||
writer->writeUtf8String( 3, ent->getStyle() );
|
||||
|
||||
if( ent->getTextLineFactor() != 0 )
|
||||
if( ent->getDir() != 0 )
|
||||
writer->writeDouble( 53, ent->getDir() );
|
||||
|
||||
writer->writeDouble( 210, ent->getExtrusion().x );
|
||||
|
|
|
@ -1030,13 +1030,12 @@ static void CreateBoardSection( FILE* aFile, BOARD* aPcb )
|
|||
fputs( "$BOARD\n", aFile );
|
||||
|
||||
// Extract the board edges
|
||||
for( EDA_ITEM* drawing = aPcb->m_Drawings;
|
||||
drawing != 0;
|
||||
for( EDA_ITEM* drawing = aPcb->m_Drawings; drawing != 0;
|
||||
drawing = drawing->Next() )
|
||||
{
|
||||
if( drawing->Type() == PCB_LINE_T )
|
||||
{
|
||||
DRAWSEGMENT* drawseg = dynamic_cast<DRAWSEGMENT*>( drawing );
|
||||
DRAWSEGMENT* drawseg = static_cast<DRAWSEGMENT*>( drawing );
|
||||
if( drawseg->GetLayer() == Edge_Cuts )
|
||||
{
|
||||
// XXX GenCAD supports arc boundaries but I've seen nothing that reads them
|
||||
|
|
|
@ -855,6 +855,7 @@ GPCB_PLUGIN::GPCB_PLUGIN() :
|
|||
m_cache( 0 ),
|
||||
m_ctl( 0 )
|
||||
{
|
||||
m_reader = NULL;
|
||||
init( 0 );
|
||||
}
|
||||
|
||||
|
@ -863,6 +864,7 @@ GPCB_PLUGIN::GPCB_PLUGIN( int aControlFlags ) :
|
|||
m_cache( 0 ),
|
||||
m_ctl( aControlFlags )
|
||||
{
|
||||
m_reader = NULL;
|
||||
init( 0 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue