Commit b3b79196 authored by unknown's avatar unknown Committed by jean-pierre charras
Browse files

coverity common folder fixes (mainly not initialized members).

parent f16e083e
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -374,14 +374,10 @@ const char* ${LEXERCLASS}::TokenName( T aTok )
{
    const char* ret;

    if( (unsigned) aTok < keyword_count )
    {
        ret = keywords[aTok].name;
    }
    else if( aTok < 0 )
    {
    if( aTok < 0 )
        ret = DSNLEXER::Syntax( aTok );
    }
    else if( (unsigned) aTok < keyword_count )
        ret = keywords[aTok].name;
    else
        ret = \"token too big\";

+3 −5
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@
#include <class_layer_box_selector.h>


LAYER_SELECTOR::LAYER_SELECTOR()
LAYER_SELECTOR::LAYER_SELECTOR() :
    m_layerhotkeys( true ),
    m_hotkeys( NULL )
{
    m_layerhotkeys = true;
    m_hotkeys      = NULL;
}


@@ -81,8 +81,6 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id,
{
    if( choices != NULL )
        ResyncBitmapOnly();

    m_hotkeys = NULL;
}


+3 −1
Original line number Diff line number Diff line
@@ -203,8 +203,10 @@ static const double PLUsPERDECIMIL = 0.102041;

HPGL_PLOTTER::HPGL_PLOTTER()
{
    SetPenSpeed( 40 );      // Default pen speed = 40 cm/s
    SetPenSpeed( 40 );      // Default pen speed = 40 cm/s; Pen speed is *always* in cm
    SetPenNumber( 1 );      // Default pen num = 1
    SetPenDiameter( 0.0 );
    SetPenOverlap( 0.0 );
}

void HPGL_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
+16 −0
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ void DSNLEXER::init()
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
                    FILE* aFile, const wxString& aFilename ) :
    iOwnReaders( true ),
    start( NULL ),
    next( NULL ),
    limit( NULL ),
    reader( NULL ),
    keywords( aKeywordTable ),
    keywordCount( aKeywordCount )
{
@@ -88,6 +92,10 @@ DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
                    const std::string& aClipboardTxt, const wxString& aSource ) :
    iOwnReaders( true ),
    start( NULL ),
    next( NULL ),
    limit( NULL ),
    reader( NULL ),
    keywords( aKeywordTable ),
    keywordCount( aKeywordCount )
{
@@ -101,6 +109,10 @@ DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
                    LINE_READER* aLineReader ) :
    iOwnReaders( false ),
    start( NULL ),
    next( NULL ),
    limit( NULL ),
    reader( NULL ),
    keywords( aKeywordTable ),
    keywordCount( aKeywordCount )
{
@@ -114,6 +126,10 @@ static const KEYWORD empty_keywords[1] = {};

DSNLEXER::DSNLEXER( const std::string& aSExpression, const wxString& aSource ) :
    iOwnReaders( true ),
    start( NULL ),
    next( NULL ),
    limit( NULL ),
    reader( NULL ),
    keywords( empty_keywords ),
    keywordCount( 0 )
{
+7 −12
Original line number Diff line number Diff line
@@ -120,18 +120,15 @@ void PARSE_ERROR::init( const char* aThrowersFile, const char* aThrowersLoc,

//-----<LINE_READER>------------------------------------------------------

LINE_READER::LINE_READER( unsigned aMaxLineLength )
LINE_READER::LINE_READER( unsigned aMaxLineLength ) :
    length( 0 ),
    lineNum( 0 ),
    line( NULL ),
    capacity( 0 ),
    maxLineLength( aMaxLineLength )
{
    lineNum = 0;

    if( aMaxLineLength == 0 )
    {
        line = 0;
    }
    else
    if( aMaxLineLength != 0 )
    {
        maxLineLength = aMaxLineLength;

        // start at the INITIAL size, expand as needed up to the MAX size in maxLineLength
        capacity = LINE_READER_LINE_INITIAL_SIZE;

@@ -143,8 +140,6 @@ LINE_READER::LINE_READER( unsigned aMaxLineLength )

        line[0] = '\0';
    }

    length  = 0;
}


Loading