nv50/ir: Initialize GCRA::RIG_Node members.
authorVinson Lee <vlee@freedesktop.org>
Sat, 8 May 2021 23:59:15 +0000 (16:59 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 May 2021 05:32:19 +0000 (05:32 +0000)
Fix defects reported by Coverity Scan.

uninit_member: Non-static class member degree is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member degreeLimit is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member maxReg is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member f is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member reg is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member weight is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10714>

src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

index f434001..655da87 100644 (file)
@@ -876,9 +876,9 @@ private:
 
 const GCRA::RelDegree GCRA::relDegree;
 
-GCRA::RIG_Node::RIG_Node() : Node(NULL), next(this), prev(this)
+GCRA::RIG_Node::RIG_Node() : Node(NULL), degree(0), degreeLimit(0), maxReg(0),
+   colors(0), f(FILE_NULL), reg(0), weight(0), next(this), prev(this)
 {
-   colors = 0;
 }
 
 void