From bf535c082bfbb1bf2271a514e677185af040b765 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 13 Feb 2021 22:20:39 -0800 Subject: [PATCH] nv50/ir: Initialize Instruction members. Fix defects reported by Coverity Scan. uninit_member: Non-static class member serial is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member sched is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member bb 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 919f68ddcab..6119827474e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -563,6 +563,7 @@ Symbol::equals(const Value *that, bool strict) const void Instruction::init() { next = prev = 0; + serial = 0; cc = CC_ALWAYS; rnd = ROUND_N; @@ -589,6 +590,9 @@ void Instruction::init() predSrc = -1; flagsDef = -1; flagsSrc = -1; + + sched = 0; + bb = NULL; } Instruction::Instruction() @@ -599,7 +603,6 @@ Instruction::Instruction() dType = sType = TYPE_F32; id = -1; - bb = 0; } Instruction::Instruction(Function *fn, operation opr, DataType ty)