nv50/ir: Initialize GCRA members in constructor.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member nodes is not initialized in this
constructor nor in any functions that it calls.
uninit_member: Non-static class member nodeCount 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/7522>
This commit is contained in:
Vinson Lee 2020-11-09 19:48:04 -08:00 committed by Marge Bot
parent 602d4a78bc
commit edc63ad44c
1 changed files with 2 additions and 0 deletions

View File

@ -1210,6 +1210,8 @@ GCRA::RIG_Node::addRegPreference(RIG_Node *node)
}
GCRA::GCRA(Function *fn, SpillCodeInserter& spill, MergedDefs& mergedDefs) :
nodes(NULL),
nodeCount(0),
func(fn),
regs(fn->getProgram()->getTarget()),
spill(spill),