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@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7703>
This commit is contained in:
Vinson Lee
2020-11-19 17:23:08 -08:00
parent 8976918efa
commit 861d48ea0b
@@ -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;