Mesa (main): amd: Initialize Gfx11Lib members in constructor.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 31 04:11:07 UTC 2022


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

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Mon May 23 16:39:10 2022 -0700

amd: Initialize Gfx11Lib members in constructor.

Fix defects reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_numPkrLog2 is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_numSaLog2 is not initialized in this constructor nor in any functions that it calls.

Fixes: 4fdf42b3c29 ("amd: import gfx11 addrlib")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16679>

---

 src/amd/addrlib/src/gfx11/gfx11addrlib.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp b/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp
index d123ffa3982..cd7c42b5ffd 100644
--- a/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp
+++ b/src/amd/addrlib/src/gfx11/gfx11addrlib.cpp
@@ -125,6 +125,8 @@ const Dim3d Gfx11Lib::Block4K_Log2_3d[]   = {{4, 4, 4}, {3, 4, 4}, {3, 4, 3}, {3
 Gfx11Lib::Gfx11Lib(const Client* pClient)
     :
     Lib(pClient),
+    m_numPkrLog2(0),
+    m_numSaLog2(0),
     m_colorBaseIndex(0),
     m_htileBaseIndex(0),
     m_dccBaseIndex(0)



More information about the mesa-commit mailing list