nvir/gm107: Initialize SchedDataCalculatorGM107 member score.
authorVinson Lee <vlee@freedesktop.org>
Tue, 27 Oct 2020 01:26:00 +0000 (18:26 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 13 Nov 2020 23:27:12 +0000 (23:27 +0000)
Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member score 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/7324>

src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h

index 54443ae..0a3678c 100644 (file)
@@ -5,7 +5,7 @@ namespace nv50_ir {
 class SchedDataCalculatorGM107 : public Pass
 {
 public:
-   SchedDataCalculatorGM107(const TargetGM107 *targ) : targ(targ) {}
+   SchedDataCalculatorGM107(const TargetGM107 *targ) : score(NULL), targ(targ) {}
 
 private:
    struct RegScores