Mesa (master): nvir/gm107: Initialize SchedDataCalculatorGM107 member score.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 23:32:08 UTC 2020


Module: Mesa
Branch: master
Commit: 5adba503ddf0dea1c34d11c0cf505eff3a2eb70c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5adba503ddf0dea1c34d11c0cf505eff3a2eb70c

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Mon Oct 26 18:26:00 2020 -0700

nvir/gm107: Initialize SchedDataCalculatorGM107 member score.

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 at freedesktop.org>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7324>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h
index 54443ae2770..0a3678cd6d4 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_sched_gm107.h
@@ -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



More information about the mesa-commit mailing list