From 91098fec960f501c95c6ecdede604484750367e4 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Mon, 25 Jul 2022 15:14:03 +0000 Subject: [PATCH] [lldb][AArch64] Use macro for unused var without asserts enabled 82d4f39f342165a92eaa1fe74488158942cf27b4 marked an unused var of mine (thanks Dmitri Gribenko!). Which reminded me lldb has a macro just for that purpose. --- lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp b/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp index dbd36fb..7e25bc4e 100644 --- a/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp +++ b/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp @@ -290,7 +290,7 @@ MemoryTagManagerAArch64MTE::UnpackTagsFromCoreFileSegment( const size_t bytes_copied = reader(tag_segment_data_address + file_offset_in_bytes, tag_bytes_to_read, tag_data.data()); - (void)bytes_copied; + UNUSED_IF_ASSERT_DISABLED(bytes_copied); assert(bytes_copied == tag_bytes_to_read); std::vector tags; -- 2.7.4