You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
This commit is contained in:
@@ -812,8 +812,6 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
|
||||
|
||||
t.value = t.object->get_indexed(t.subpath);
|
||||
t.value.zero();
|
||||
|
||||
t.skip = false;
|
||||
}
|
||||
|
||||
/* STEP 2 PROCESS ANIMATIONS */
|
||||
@@ -886,7 +884,7 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
|
||||
|
||||
Track &t = E->get();
|
||||
|
||||
if (t.skip || !t.object)
|
||||
if (!t.object)
|
||||
continue;
|
||||
|
||||
if (t.subpath.size()) { // value track
|
||||
|
||||
Reference in New Issue
Block a user