Skip to content

Commit a7f20f3

Browse files
committed
tier0: Fix unused args warning when build with AddressSanitizer
1 parent 6207994 commit a7f20f3

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tier0/memdbg.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,8 +1562,10 @@ void CDbgMemAlloc::RegisterDeallocation(unsigned int nStatIndex,
15621562
}
15631563
#endif
15641564

1565-
void CDbgMemAlloc::RegisterAllocation(MemInfo_t &info, size_t nLogicalSize,
1566-
size_t nActualSize, unsigned nTime) {
1565+
void CDbgMemAlloc::RegisterAllocation([[maybe_unused]] MemInfo_t &info,
1566+
[[maybe_unused]] size_t nLogicalSize,
1567+
[[maybe_unused]] size_t nActualSize,
1568+
[[maybe_unused]] unsigned nTime) {
15671569
#ifndef __SANITIZE_ADDRESS__
15681570
++info.m_nCurrentCount;
15691571
++info.m_nTotalCount;
@@ -1605,8 +1607,10 @@ void CDbgMemAlloc::RegisterAllocation(MemInfo_t &info, size_t nLogicalSize,
16051607
#endif
16061608
}
16071609

1608-
void CDbgMemAlloc::RegisterDeallocation(MemInfo_t &info, size_t nLogicalSize,
1609-
size_t nActualSize, unsigned nTime) {
1610+
void CDbgMemAlloc::RegisterDeallocation([[maybe_unused]] MemInfo_t &info,
1611+
[[maybe_unused]] size_t nLogicalSize,
1612+
[[maybe_unused]] size_t nActualSize,
1613+
[[maybe_unused]] unsigned nTime) {
16101614
#ifndef __SANITIZE_ADDRESS__
16111615
--info.m_nCurrentCount;
16121616
info.m_nCurrentSize -= nLogicalSize;

0 commit comments

Comments
 (0)