amd/addrlib: mark *pEqToCheck as MAYBE_UNUSED in Addr::V2::Gfx9Lib::ComputeStereoInfo...
authorKai Wasserbäch <kai@dev.carbon-project.org>
Tue, 21 Aug 2018 15:25:45 +0000 (17:25 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Aug 2018 18:33:21 +0000 (14:33 -0400)
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 <kai@dev.carbon-project.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/addrlib/gfx9/gfx9addrlib.cpp

index 853a0411587465280a8eb7cf49f71e11424dd1e3..d27aabbb60c880f6e7dcad672b40a287f7413fba 100644 (file)
@@ -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));