From 861d48ea0b1831dcfe95c0c3ad3afaa5808e0408 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 19 Nov 2020 17:23:08 -0800 Subject: [PATCH] nv50/ir: Initialize Program members in constructor. Fix defects reported by Coverity Scan. uninit_member: Non-static class member tlsSize is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member driver is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member driver_out is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Vinson Lee Reviewed-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index af261381fbe..a67504f2b46 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -1169,13 +1169,16 @@ FlowInstruction::clone(ClonePolicy& pol, Instruction *i) const Program::Program(Type type, Target *arch) : progType(type), target(arch), + tlsSize(0), mem_Instruction(sizeof(Instruction), 6), mem_CmpInstruction(sizeof(CmpInstruction), 4), mem_TexInstruction(sizeof(TexInstruction), 4), mem_FlowInstruction(sizeof(FlowInstruction), 4), mem_LValue(sizeof(LValue), 8), mem_Symbol(sizeof(Symbol), 7), - mem_ImmediateValue(sizeof(ImmediateValue), 7) + mem_ImmediateValue(sizeof(ImmediateValue), 7), + driver(NULL), + driver_out(NULL) { code = NULL; binSize = 0;