Mesa (master): nv50/ir: Initialize Program members in constructor.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Nov 22 22:54:32 UTC 2020
Module: Mesa
Branch: master
Commit: 861d48ea0b1831dcfe95c0c3ad3afaa5808e0408
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=861d48ea0b1831dcfe95c0c3ad3afaa5808e0408
Author: Vinson Lee <vlee at freedesktop.org>
Date: Thu Nov 19 17:23:08 2020 -0800
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 <vlee at freedesktop.org>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7703>
---
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<Function>& 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;
More information about the mesa-commit
mailing list