From: David Spickett Date: Mon, 25 Jul 2022 15:14:03 +0000 (+0000) Subject: [lldb][AArch64] Use macro for unused var without asserts enabled X-Git-Tag: upstream/15.0.7~555 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91098fec960f501c95c6ecdede604484750367e4;p=platform%2Fupstream%2Fllvm.git [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. --- 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;