diff options
author | Kai Wasserbäch <[email protected]> | 2018-08-18 11:45:30 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-08-22 14:33:21 -0400 |
commit | 556f89a7158bfaa5a2332ac84c7be9b113a80f13 (patch) | |
tree | 4d4dec237fd2d0b6fba5791b1157c8a023a66c32 /src/amd/addrlib/gfx9/gfx9addrlib.cpp | |
parent | 15ca5ce99a80d9ebb5ef2b1aca6ea00784931de4 (diff) |
amd/addrlib: mark microBlockDim as MAYBE_UNUSED in Addr::V2::Gfx9Lib::HwlComputeBlock256Equation
Only used, when asserts are enabled.
Fixes an unused-but-set-variable warning with GCC 8:
../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp: In member function 'virtual ADDR_E_RETURNCODE Addr::V2::Gfx9Lib::HwlComputeBlock256Equation(AddrResourceType, AddrSwizzleMode, unsigned int, ADDR_EQUATION*) const':
../../../src/amd/addrlib/gfx9/gfx9addrlib.cpp:2473:15: warning: variable 'microBlockDim' set but not used [-Wunused-but-set-variable]
Dim2d microBlockDim = Block256_2d[elementBytesLog2];
^~~~~~~~~~~~~
Signed-off-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd/addrlib/gfx9/gfx9addrlib.cpp')
-rw-r--r-- | src/amd/addrlib/gfx9/gfx9addrlib.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/addrlib/gfx9/gfx9addrlib.cpp b/src/amd/addrlib/gfx9/gfx9addrlib.cpp index ef86c3bc7b5..853a0411587 100644 --- a/src/amd/addrlib/gfx9/gfx9addrlib.cpp +++ b/src/amd/addrlib/gfx9/gfx9addrlib.cpp @@ -37,6 +37,8 @@ #include "amdgpu_asic_addr.h" +#include "util/macros.h" + //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -2470,7 +2472,7 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeBlock256Equation( // Post validation if (ret == ADDR_OK) { - Dim2d microBlockDim = Block256_2d[elementBytesLog2]; + MAYBE_UNUSED Dim2d microBlockDim = Block256_2d[elementBytesLog2]; ADDR_ASSERT((2u << GetMaxValidChannelIndex(pEquation->addr, 8, 0)) == (microBlockDim.w * (1 << elementBytesLog2))); ADDR_ASSERT((2u << GetMaxValidChannelIndex(pEquation->addr, 8, 1)) == microBlockDim.h); |