Mesa (main): nvc0/ir: Initialize Limits members in constructor.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 18 05:38:29 UTC 2021


Module: Mesa
Branch: main
Commit: 2624765e66efbedd65841a11d68d3bd4a3baccbe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2624765e66efbedd65841a11d68d3bd4a3baccbe

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Sun Jun 13 17:09:46 2021 -0700

nvc0/ir: Initialize Limits members in constructor.

Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member min is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member max 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/11351>

---

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

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h
index 8c99427d3c0..70e5a034195 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h
@@ -100,7 +100,7 @@ private:
    };
    struct Limits
    {
-      Limits() { }
+      Limits() : min(0), max(0) { }
       Limits(int min, int max) : min(min), max(max) { }
       int min, max;
    };



More information about the mesa-commit mailing list