Code Monkey home page Code Monkey logo

assimp's People

Contributors

aavenel avatar abma avatar acgessler avatar aoowweenn avatar ardenpm avatar arris69 avatar bztsrc avatar cgettys avatar dhritzkiv avatar dibenedetto avatar elect86 avatar escherstair avatar gargaj avatar jaredmulconry avatar jdduke avatar kimkulling avatar kkulling avatar legalizeadulthood avatar malcolmtyrrell avatar malortie avatar matt77hias avatar mesilliac avatar ms-maxvollmer avatar revolupowered avatar richardtea avatar smalcom avatar terziman avatar thomasbiang avatar turol avatar wise86-android avatar

Watchers

 avatar  avatar

Forkers

monocle-ai

assimp's Issues

Potential issue in code/Material/MaterialSystem.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

3 instances of this defect were found in the following locations:

Instance 1
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop);

Check out: prop

Code extract:

    ai_assert( pMat != nullptr );

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop); <------ HERE
    if ( nullptr == prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Instance 2
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**) &prop);

Check out: prop

Code extract:

    ai_assert( pMat != NULL );

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**) &prop); <------ HERE
    if (!prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Instance 3
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**)&prop);

Check out: prop

Code extract:

    ai_assert (pOut != NULL);

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**)&prop); <------ HERE
    if (!prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Potential issue in tools/assimp_cmd/CompareDump.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

2 instances of this defect were found in the following locations:

Instance 1
File : tools/assimp_cmd/CompareDump.cpp
Function: fread

res|=fread(&actual.first,4,1,ctx.get_actual()) <<2u;

Check out:actual

Code extract:

        res|=fread(&current.first,4,1,ctx.get_expect());
        res|=fread(&current.second,4,1,ctx.get_expect())    <<1u;
        res|=fread(&actual.first,4,1,ctx.get_actual())      <<2u; <------ HERE
        res|=fread(&actual.second,4,1,ctx.get_actual())     <<3u;

How can I fix it?
Correct reference usage found in tools/assimp_cmd/CompareDump.cpp at line 277.

if(1 != fread(&fille,sizeof(T),1,expect)) {

Code extract:

        if(1 != fread(&filla,sizeof(T),1,actual)) {
            EOFActual();
        }
        if(1 != fread(&fille,sizeof(T),1,expect)) { <------ HERE
            EOFExpect();
        }

Instance 2
File : tools/assimp_cmd/CompareDump.cpp
Function: fread

res|=fread(&actual.second,4,1,ctx.get_actual()) <<3u;

Check out:actual

Code extract:

        res|=fread(&current.first,4,1,ctx.get_expect());
        res|=fread(&current.second,4,1,ctx.get_expect())    <<1u;
        res|=fread(&actual.first,4,1,ctx.get_actual())      <<2u;
        res|=fread(&actual.second,4,1,ctx.get_actual())     <<3u; <------ HERE

        if(res!=0xf) {

How can I fix it?
Correct reference usage found in tools/assimp_cmd/CompareDump.cpp at line 277.

if(1 != fread(&fille,sizeof(T),1,expect)) {

Code extract:

        if(1 != fread(&filla,sizeof(T),1,actual)) {
            EOFActual();
        }
        if(1 != fread(&fille,sizeof(T),1,expect)) { <------ HERE
            EOFExpect();
        }

Potential issue in tools/assimp_cmd/CompareDump.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

2 instances of this defect were found in the following locations:

Instance 1
File : tools/assimp_cmd/CompareDump.cpp
Function: fread

res|=fread(&actual.first,4,1,ctx.get_actual()) <<2u;

Check out: actual

Code extract:

        res|=fread(&current.first,4,1,ctx.get_expect());
        res|=fread(&current.second,4,1,ctx.get_expect())    <<1u;
        res|=fread(&actual.first,4,1,ctx.get_actual())      <<2u; <------ HERE
        res|=fread(&actual.second,4,1,ctx.get_actual())     <<3u;

How can I fix it?
Correct reference usage found in tools/assimp_cmd/CompareDump.cpp at line 277.

if(1 != fread(&fille,sizeof(T),1,expect)) {

Code extract:

        if(1 != fread(&filla,sizeof(T),1,actual)) {
            EOFActual();
        }
        if(1 != fread(&fille,sizeof(T),1,expect)) { <------ HERE
            EOFExpect();
        }

Instance 2
File : tools/assimp_cmd/CompareDump.cpp
Function: fread

res|=fread(&actual.second,4,1,ctx.get_actual()) <<3u;

Check out: actual

Code extract:

        res|=fread(&current.first,4,1,ctx.get_expect());
        res|=fread(&current.second,4,1,ctx.get_expect())    <<1u;
        res|=fread(&actual.first,4,1,ctx.get_actual())      <<2u;
        res|=fread(&actual.second,4,1,ctx.get_actual())     <<3u; <------ HERE

        if(res!=0xf) {

How can I fix it?
Correct reference usage found in tools/assimp_cmd/CompareDump.cpp at line 277.

if(1 != fread(&fille,sizeof(T),1,expect)) {

Code extract:

        if(1 != fread(&filla,sizeof(T),1,actual)) {
            EOFActual();
        }
        if(1 != fread(&fille,sizeof(T),1,expect)) { <------ HERE
            EOFExpect();
        }

Potential issue in code/AssetLib/IFC/IFCLoader.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : code/AssetLib/IFC/IFCLoader.cpp
Function: unzGetCurrentFileInfo
https://github.com/sagpant/assimp/blob/1427e67b54906419e9f83cc8625e2207fbb0fcd5/code/AssetLib/IFC/IFCLoader.cpp#L196Check out:fileInfo

Code extract:

                // get file size, etc.
                unz_file_info fileInfo;
                char filename[256];
                unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0); <------ HERE
                if (GetExtension(filename) != "ifc") {
                    continue;

How can I fix it?
Correct reference usage found in code/Common/ZipArchiveIOSystem.cpp at line 363.

if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) {

Code extract:

        char filename[FileNameSize];
        unz_file_info fileInfo;

        if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) { <------ HERE
            if (fileInfo.uncompressed_size != 0) {
                std::string filename_string(filename, fileInfo.size_filename);

Potential issue in code/AssetLib/Raw/RawLoader.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : code/AssetLib/Raw/RawLoader.cpp
Function: $SkipSpaces@D@Assimp

const char* sz = line;SkipSpaces(&sz);

Check out:sz

Code extract:

    {
        // if the line starts with a non-numeric identifier, it marks
        // the beginning of a new group
        const char* sz = line;SkipSpaces(&sz); <------ HERE
        if (IsLineEnd(*sz))continue;
        if (!IsNumeric(*sz))

How can I fix it?
Correct reference usage found in code/AssetLib/XGL/XGLLoader.cpp at line 924.

if(!SkipSpaces(&s)) {

Code extract:

    const char* s = m_reader->getNodeData();

    for(int i = 0; i < 3; ++i) {
        if(!SkipSpaces(&s)) { <------ HERE
            LogError("unexpected EOL, failed to parse vec3");
            return vec;

Potential issue in code/AssetLib/IFC/IFCLoader.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : code/AssetLib/IFC/IFCLoader.cpp
Function: unzGetCurrentFileInfo

unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0);

Check out: fileInfo

Code extract:

                // get file size, etc.
                unz_file_info fileInfo;
                char filename[256];
                unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0); <------ HERE
                if (GetExtension(filename) != "ifc") {
                    continue;

How can I fix it?
Correct reference usage found in code/Common/ZipArchiveIOSystem.cpp at line 363.

if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) {

Code extract:

        char filename[FileNameSize];
        unz_file_info fileInfo;

        if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) { <------ HERE
            if (fileInfo.uncompressed_size != 0) {
                std::string filename_string(filename, fileInfo.size_filename);

Potential issue in code/AssetLib/IFC/IFCLoader.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : code/AssetLib/IFC/IFCLoader.cpp
Function: unzGetCurrentFileInfo

unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0);

Check out: fileInfo, fileInfo2, fileInfo3

Code extract:

                // get file size, etc.
                unz_file_info fileInfo;
                char filename[256];
                unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0); <------ HERE
                if (GetExtension(filename) != "ifc") {
                    continue;

How can I fix it?
Correct reference usage found in code/Common/ZipArchiveIOSystem.cpp at line 363.

if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) {

Code extract:

        char filename[FileNameSize];
        unz_file_info fileInfo;

        if (unzGetCurrentFileInfo(m_ZipFileHandle, &fileInfo, filename, FileNameSize, nullptr, 0, nullptr, 0) == UNZ_OK) { <------ HERE
            if (fileInfo.uncompressed_size != 0) {
                std::string filename_string(filename, fileInfo.size_filename);

Potential issue in code/AssetLib/Raw/RawLoader.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

1 instance of this defect were found in the following locations:

Instance 1
File : code/AssetLib/Raw/RawLoader.cpp
Function: $SkipSpaces@D@Assimp

const char* sz = line;SkipSpaces(&sz);

Check out: sz

Code extract:

    {
        // if the line starts with a non-numeric identifier, it marks
        // the beginning of a new group
        const char* sz = line;SkipSpaces(&sz); <------ HERE
        if (IsLineEnd(*sz))continue;
        if (!IsNumeric(*sz))

How can I fix it?
Correct reference usage found in code/AssetLib/XGL/XGLLoader.cpp at line 924.

if(!SkipSpaces(&s)) {

Code extract:

    const char* s = m_reader->getNodeData();

    for(int i = 0; i < 3; ++i) {
        if(!SkipSpaces(&s)) { <------ HERE
            LogError("unexpected EOL, failed to parse vec3");
            return vec;

Potential issue in code/Material/MaterialSystem.cpp: Unchecked return from initialization function

What is a Conditionally Uninitialized Variable? The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

3 instances of this defect were found in the following locations:

Instance 1
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop);

Check out:prop

Code extract:

    ai_assert( pMat != nullptr );

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index, (const aiMaterialProperty**) &prop); <------ HERE
    if ( nullptr == prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Instance 2
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**) &prop);

Check out:prop

Code extract:

    ai_assert( pMat != NULL );

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**) &prop); <------ HERE
    if (!prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Instance 3
File : code/Material/MaterialSystem.cpp
Function: aiGetMaterialProperty

aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**)&prop);

Check out:prop

Code extract:

    ai_assert (pOut != NULL);

    const aiMaterialProperty* prop;
    aiGetMaterialProperty(pMat,pKey,type,index,(const aiMaterialProperty**)&prop); <------ HERE
    if (!prop) {
        return AI_FAILURE;

How can I fix it?
Correct reference usage found in code/Common/SceneCombiner.cpp at line 938.

if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) {

Code extract:

            // Test if we already have a matching property
            const aiMaterialProperty* prop_exist;
            if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { <------ HERE
                // If not, we add it to the new material
                aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.