enginmanap / limonEngine

3D FPS game engine with full dynamic lighting and shadows

Home Page:http://www.limonengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uninitialised variable `animationTimeNew` in `ModelAsset::getTransformBlended` code

jmcph4 opened this issue · comments

During standard build process:

[ 59%] Building CXX object CMakeFiles/LimonEngine.dir/src/Assets/ModelAsset.cpp.o
src/Assets/ModelAsset.cpp: In member function ‘bool ModelAsset::getTransformBlended(std::__cxx11::string, long int, bool, std::__cxx11::string, long int, bool, float, std::vector<glm::tmat4x4<float, (glm::precision)0u> >&) const’:
src/Assets/ModelAsset.cpp:456:115: warning: ‘animationTimeNew’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         traverseAndSetTransform(rootNode, parentTransform, currentAnimationNew, animationTimeNew, transformMatrix);
                                                                                                                   ^

The variable in question animationTimeNew, is declared here:

float animationTimeNew;

See #76 for review

Just thought I'd provide an update on this. As of (at least) 022e002, this is the build output:

[ 59%] Building CXX object CMakeFiles/LimonEngine.dir/src/Assets/ModelAsset.cpp.o
src/Assets/ModelAsset.cpp: In member function ‘bool ModelAsset::getTransformBlended(std::__cxx11::string, long int, bool, std::__cxx11::string, long int, bool, float, std::vector<glm::tmat4x4<float, (glm::precision)0u> >&) const’:
src/Assets/ModelAsset.cpp:467:108: warning: ‘animationTimeNew’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                                        currentAnimationNew, animationTimeNew, blendFactor, transformMatrix);
                                                                                                            ^
src/Assets/ModelAsset.cpp:467:108: warning: ‘animationTimeOld’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Any word on a fix for this?

Sorry it is taking long, but I am trying to finish up some other development. I didn't have time to look into this yet.

Hey, I merged your commit yesterday, and made another to fix the second one. Thanks.

Closing as done.