From 6a7ef7c7dc8587d2d0b7a89e4426602e92125d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Wasserb=C3=A4ch?= Date: Tue, 21 Aug 2018 17:25:45 +0200 Subject: [PATCH] amd/addrlib: mark *pEqToCheck as MAYBE_UNUSED in Addr::V2::Gfx9Lib::ComputeStereoInfo (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Only used, when asserts are enabled. Fixes an unused-variable warning with GCC 8: ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp: In member function 'ADDR_E_RETURNCODE Addr::V2::Gfx9Lib::ComputeStereoInfo(const ADDR2_COMPUTE_SURFACE_INFO_INPUT*, ADDR2_COMPUTE_SURFACE_INFO_OUTPUT*, unsigned int*) const': ../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp:3879:34: warning: unused variable 'pEqToCheck' [-Wunused-variable] const ADDR_EQUATION *pEqToCheck = &m_equationTable[eqIndex]; ^~~~~~~~~~ v2: Don't realign other variable definitions, to keep in line with file style (Marek) Signed-off-by: Kai Wasserbäch Reviewed-by: Marek Olšák --- src/amd/addrlib/gfx9/gfx9addrlib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/addrlib/gfx9/gfx9addrlib.cpp b/src/amd/addrlib/gfx9/gfx9addrlib.cpp index 853a0411587..d27aabbb60c 100644 --- a/src/amd/addrlib/gfx9/gfx9addrlib.cpp +++ b/src/amd/addrlib/gfx9/gfx9addrlib.cpp @@ -3878,7 +3878,7 @@ ADDR_E_RETURNCODE Gfx9Lib::ComputeStereoInfo( const UINT_32 numBankBits = GetBankXorBits(blkSizeLog2); const UINT_32 bppLog2 = Log2(pIn->bpp >> 3); const UINT_32 maxYCoordBlock256 = Log2(Block256_2d[bppLog2].h) - 1; - const ADDR_EQUATION *pEqToCheck = &m_equationTable[eqIndex]; + MAYBE_UNUSED const ADDR_EQUATION *pEqToCheck = &m_equationTable[eqIndex]; ADDR_ASSERT(maxYCoordBlock256 == GetMaxValidChannelIndex(&pEqToCheck->addr[0], GetBlockSizeLog2(ADDR_SW_256B), 1)); -- 2.30.2