Commit a550ff84 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix some coverity and cppcheck warnings (most are very minor issues: not...

Fix some coverity and cppcheck warnings (most are very minor issues: not initialized members and initialized but not used variables)
parent 5f1c9060
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@
#endif
#endif


#ifndef KICAD_BUILD_VERSION
#ifndef KICAD_BUILD_VERSION
#   define KICAD_BUILD_VERSION "(after 2015-jan-16 BZR unknown)"
#   define KICAD_BUILD_VERSION "(after 2015-mar-04 BZR unknown)"
#endif
#endif


/**
/**
+3 −3
Original line number Original line Diff line number Diff line
@@ -90,9 +90,9 @@ bool LIB_BEZIER::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
        return false;
        return false;
    }
    }


    p = strtok( line + 2, " \t\n" );
    strtok( line + 2, " \t\n" );     // Skip field
    p = strtok( NULL, " \t\n" );
    strtok( NULL, " \t\n" );         // Skip field
    p = strtok( NULL, " \t\n" );
    strtok( NULL, " \t\n" );         // Skip field
    p = strtok( NULL, " \t\n" );
    p = strtok( NULL, " \t\n" );


    for( i = 0; i < ccount; i++ )
    for( i = 0; i < ccount; i++ )
+3 −3
Original line number Original line Diff line number Diff line
@@ -95,9 +95,9 @@ bool LIB_POLYLINE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
        return false;
        return false;
    }
    }


    p = strtok( line + 2, " \t\n" );
    strtok( line + 2, " \t\n" );     // Skip field
    p = strtok( NULL, " \t\n" );
    strtok( NULL, " \t\n" );         // Skip field
    p = strtok( NULL, " \t\n" );
    strtok( NULL, " \t\n" );         // Skip field
    p = strtok( NULL, " \t\n" );
    p = strtok( NULL, " \t\n" );


    for( i = 0; i < ccount; i++ )
    for( i = 0; i < ccount; i++ )
+1 −1
Original line number Original line Diff line number Diff line
@@ -58,7 +58,7 @@ class WORKSHEET_LAYOUT_IO
protected:
protected:
    OUTPUTFORMATTER* m_out;
    OUTPUTFORMATTER* m_out;


    WORKSHEET_LAYOUT_IO() {}
    WORKSHEET_LAYOUT_IO() { m_out = NULL; }
    virtual ~WORKSHEET_LAYOUT_IO() {}
    virtual ~WORKSHEET_LAYOUT_IO() {}


public:
public:
+6 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,12 @@ ATTENUATOR::ATTENUATOR( ATTENUATORS_TYPE aTopology )
    m_MinimumATT    = 0.0;          // dB
    m_MinimumATT    = 0.0;          // dB
    m_SchBitMap     = NULL;
    m_SchBitMap     = NULL;
    m_FormulaBitMap = NULL;
    m_FormulaBitMap = NULL;

    // Initialize these variables mainly to avoid warnings from a static analyzer
    m_R1 = 0.0;
    m_R2 = 0.0;
    m_R3 = 0.0;
    Lmin = L = A = 0.0;     // internal variable for temporary use
}
}




Loading