From: Vinson Lee Date: Wed, 25 Nov 2020 03:20:01 +0000 (-0800) Subject: amd/addrlib: Initialize Lib members in constructors. X-Git-Tag: upstream/21.0.0~1704 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf7bf7fadeb76a084235dcfaca8c96f569909aed;p=platform%2Fupstream%2Fmesa.git amd/addrlib: Initialize Lib members in constructors. Fix defects reported by Coverity Scan. uninit_member: Non-static class member m_maxBaseAlign is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member m_maxMetaBaseAlign is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Vinson Lee Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/amd/addrlib/src/core/addrlib.cpp b/src/amd/addrlib/src/core/addrlib.cpp index bb431c894e6..5e6c819c1a6 100644 --- a/src/amd/addrlib/src/core/addrlib.cpp +++ b/src/amd/addrlib/src/core/addrlib.cpp @@ -107,6 +107,8 @@ Lib::Lib() : m_rowSize(0), m_minPitchAlignPixels(1), m_maxSamples(8), + m_maxBaseAlign(0), + m_maxMetaBaseAlign(0), m_pElemLib(NULL) { m_configFlags.value = 0; @@ -132,6 +134,8 @@ Lib::Lib(const Client* pClient) : m_rowSize(0), m_minPitchAlignPixels(1), m_maxSamples(8), + m_maxBaseAlign(0), + m_maxMetaBaseAlign(0), m_pElemLib(NULL) { m_configFlags.value = 0;