[Mesa-dev] [PATCH 04/12] amd/addrlib: mark numPipes as MAYBE_UNUSED in Addr::V1::EgBasedLib::SanityCheckMacroTiled
Kai Wasserbäch
kai at dev.carbon-project.org
Sat Aug 18 11:16:08 UTC 2018
Only used, when asserts are enabled.
Fixes an unused-variable warning with GCC 8:
../../../src/amd/addrlib/r800/egbaddrlib.cpp: In member function 'int Addr::V1::EgBasedLib::SanityCheckMacroTiled(ADDR_TILEINFO*) const':
../../../src/amd/addrlib/r800/egbaddrlib.cpp:982:13: warning: unused variable 'numPipes' [-Wunused-variable]
UINT_32 numPipes = HwlGetPipes(pTileInfo);
^~~~~~~~
Cc: Marek Olšák <maraeo at gmail.com>
Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>
---
src/amd/addrlib/r800/egbaddrlib.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/amd/addrlib/r800/egbaddrlib.cpp b/src/amd/addrlib/r800/egbaddrlib.cpp
index 3947cfda2f..37a60c7a85 100644
--- a/src/amd/addrlib/r800/egbaddrlib.cpp
+++ b/src/amd/addrlib/r800/egbaddrlib.cpp
@@ -33,6 +33,8 @@
#include "egbaddrlib.h"
+#include "util/macros.h"
+
namespace Addr
{
namespace V1
@@ -978,8 +980,8 @@ BOOL_32 EgBasedLib::SanityCheckMacroTiled(
ADDR_TILEINFO* pTileInfo ///< [in] macro-tiled parameters
) const
{
- BOOL_32 valid = TRUE;
- UINT_32 numPipes = HwlGetPipes(pTileInfo);
+ BOOL_32 valid = TRUE;
+ MAYBE_UNUSED UINT_32 numPipes = HwlGetPipes(pTileInfo);
switch (pTileInfo->banks)
{
--
2.18.0
More information about the mesa-dev
mailing list