Mesa (master): glsl: Initialize ir_variable member field data.is_xfb.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 11 19:16:18 UTC 2020


Module: Mesa
Branch: master
Commit: e7aa3cf8283088809625cb84fa78f1d301f35311
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7aa3cf8283088809625cb84fa78f1d301f35311

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Mon Nov  2 18:17:13 2020 -0800

glsl: Initialize ir_variable member field data.is_xfb.

Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member field data.is_xfb is not
initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7414>

---

 src/compiler/glsl/ir.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 7b30de2183f..d24d98c0637 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -2025,6 +2025,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
    this->data.has_initializer = false;
    this->data.is_implicit_initializer = false;
    this->data.is_unmatched_generic_inout = false;
+   this->data.is_xfb = false;
    this->data.is_xfb_only = false;
    this->data.explicit_xfb_buffer = false;
    this->data.explicit_xfb_offset = false;



More information about the mesa-commit mailing list