Commit 25b9a42e authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

More Coverity scan error fix goodness.

parent 9131d89e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MASTER* aMaster ) :
{
    m_model = NULL;
    m_file  = NULL;
    m_Materials = NULL;
    m_normalPerVertex = true;
    colorPerVertex = true;
}


+8 −6
Original line number Diff line number Diff line
@@ -253,15 +253,14 @@ int VRML2_MODEL_PARSER::read_Transform()
}


/**
 * Read the DEF for a Coordinate
 */
int VRML2_MODEL_PARSER::read_DEF_Coordinate()
{
    char text[128];

    // Get the name of the definition.
    GetNextTag( m_file, text, sizeof(text) );
    if( !GetNextTag( m_file, text, sizeof(text) ) )
        return -1;

    std::string coordinateName = text;

    while( GetNextTag( m_file, text, sizeof(text) ) )
@@ -291,7 +290,8 @@ int VRML2_MODEL_PARSER::read_DEF()
{
    char text[128];

    GetNextTag( m_file, text, sizeof(text) );
    if( !GetNextTag( m_file, text, sizeof(text) ) )
        return -1;

    while( GetNextTag( m_file, text, sizeof(text) ) )
    {
@@ -348,7 +348,9 @@ int VRML2_MODEL_PARSER::read_USE()
    char text[128];

    // Get the name of the definition.
    GetNextTag( m_file, text, sizeof(text) );
    if( !GetNextTag( m_file, text, sizeof(text) ) )
        return -1;

    std::string coordinateName = text;

    // Look for it in our coordinate map.
+4 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com>
 * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
 * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -44,6 +44,7 @@
X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) :
    S3D_MODEL_PARSER( aMaster )
{
    m_model = NULL;
}


@@ -52,7 +53,7 @@ X3D_MODEL_PARSER::~X3D_MODEL_PARSER()
}


void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Dunits )
void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlUnitsTo3DUnits )
{
    wxXmlDocument doc;

@@ -69,7 +70,7 @@ void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Du
    }


    float vrmlunits_to_3Dunits = aVrmlunits_to_3Dunits;
    float vrmlunits_to_3Dunits = aVrmlUnitsTo3DUnits;
    glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits );

    glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y,
+4 −3
Original line number Diff line number Diff line
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2010-12 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
 * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
 * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors.
 * Copyright (C) 2012-2015 KiCad Developers, see change_log.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -701,7 +701,8 @@ const wxString FP_LIB_TABLE::GlobalPathEnvVariableName()
}


bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR )
bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable )
    throw (IO_ERROR, PARSE_ERROR, boost::interprocess::lock_exception )
{
    bool        tableExists = true;
    wxFileName  fn = GetGlobalTableFileName();
+2 −1
Original line number Diff line number Diff line
@@ -806,7 +806,8 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName ) throw( IO_ERROR, bo
}


PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) throw( IO_ERROR )
PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator )
    throw( IO_ERROR, boost::bad_pointer )
{
#if 1
    // Don't reload the library if it is already loaded.
Loading