From: Vinson Lee Date: Thu, 8 Oct 2020 21:55:17 +0000 (-0700) Subject: glsl: Initialize ir_to_mesa_visitor members in constructor. X-Git-Tag: upstream/21.0.0~4311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bdb1e5aa0ae6410ec829f6213549f951a5f17684;p=platform%2Fupstream%2Fmesa.git glsl: Initialize ir_to_mesa_visitor members in constructor. 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: --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 3ee8490..c038473 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()