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

Author: Vinson Lee <[email protected]>
Date:   Tue Oct 20 17:25:44 2020 -0700

glsl: Initialize lower_shared_reference_visitor members.

Fix defects reported by Coverity Scan.

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

Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7243>

---

 src/compiler/glsl/lower_shared_reference.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/lower_shared_reference.cpp 
b/src/compiler/glsl/lower_shared_reference.cpp
index beb5d804a65..6667db3d5ef 100644
--- a/src/compiler/glsl/lower_shared_reference.cpp
+++ b/src/compiler/glsl/lower_shared_reference.cpp
@@ -54,7 +54,9 @@ class lower_shared_reference_visitor :
 public:
 
    lower_shared_reference_visitor(struct gl_linked_shader *shader)
-      : list_ctx(ralloc_context(NULL)), shader(shader), shared_size(0u)
+      : buffer_access_type(shared_load_access),
+      list_ctx(ralloc_context(NULL)), shader(shader), shared_size(0u),
+      progress(false)
    {
       list_inithead(&var_offsets);
    }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to