From bdb1e5aa0ae6410ec829f6213549f951a5f17684 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 8 Oct 2020 14:55:17 -0700 Subject: [PATCH] glsl: Initialize ir_to_mesa_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 ctx is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member prog is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member shader_program is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member options 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/mesa/program/ir_to_mesa.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 3ee8490ddc0..c038473a803 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2190,6 +2190,10 @@ ir_to_mesa_visitor::ir_to_mesa_visitor() next_signature_id = 1; current_function = NULL; mem_ctx = ralloc_context(NULL); + ctx = NULL; + prog = NULL; + shader_program = NULL; + options = NULL; } ir_to_mesa_visitor::~ir_to_mesa_visitor()