glsl: Initialize lower_ubo_reference_visitor members in constructor.

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 <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7120>
This commit is contained in:
Vinson Lee
2020-10-13 18:07:41 -07:00
committed by Marge Bot
parent e32eadc586
commit b17e264e66
+4 -2
View File
@@ -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;
}