From b17e264e66003a60d3dd779f6cece9c863c92826 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 13 Oct 2020 18:07:41 -0700 Subject: [PATCH] glsl: Initialize lower_ubo_reference_visitor members in constructor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix defects reported by Coverity Scan. Uninitialized pointer 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 uniform_block 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 Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/lower_ubo_reference.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp index 9c1325b53ac..71dbd490023 100644 --- a/src/compiler/glsl/lower_ubo_reference.cpp +++ b/src/compiler/glsl/lower_ubo_reference.cpp @@ -48,8 +48,10 @@ public: lower_ubo_reference_visitor(struct gl_linked_shader *shader, bool clamp_block_indices, bool use_std430_as_default) - : shader(shader), clamp_block_indices(clamp_block_indices), - struct_field(NULL), variable(NULL) + : buffer_access_type(ubo_load_access), + shader(shader), clamp_block_indices(clamp_block_indices), + struct_field(NULL), variable(NULL), uniform_block(NULL), + progress(false) { this->use_std430_as_default = use_std430_as_default; }