[Bf-blender-cvs] [86b1887ded6] master: Cleanup Collada: make sure float array is initialised

Gaia Clary noreply at git.blender.org
Sun Mar 11 21:00:04 CET 2018


Commit: 86b1887ded6fc75cf495aabf38022f1231c912ca
Author: Gaia Clary
Date:   Sun Mar 11 19:51:16 2018 +0100
Branches: master
https://developer.blender.org/rB86b1887ded6fc75cf495aabf38022f1231c912ca

Cleanup Collada: make sure float array is initialised

This is just to silence a compiler warning and keeping
the code clean. The actual code never uses uninitialised
array elements.

===================================================================

M	source/blender/collada/AnimationImporter.cpp

===================================================================

diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 533090225dc..0b61f7fa8b2 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -1561,7 +1561,8 @@ Object *AnimationImporter::translate_animation_OLD(COLLADAFW::Node *node,
 			copy_m4_m4(mat, matfra);
 		}
 
-		float val[4], rot[4], loc[3], scale[3];
+		float val[4] = {};
+		float rot[4], loc[3], scale[3];
 
 		switch (tm_type) {
 			case COLLADAFW::Transformation::ROTATE:



More information about the Bf-blender-cvs mailing list