Silence unused variable warning in release builds

lldb/source/Core/DataFileCache.cpp:278:10: warning: unused variable 'pos' [-Wunused-variable]
    auto pos = m_string_to_offset.find(s);
         ^
lldb/source/Core/DataFileCache.cpp:277:18: warning: unused variable 'stroff' [-Wunused-variable]
    const size_t stroff = encoder.GetByteSize() - strtab_offset;
                 ^
This commit is contained in:
Benjamin Kramer
2021-12-17 16:05:40 +01:00
parent e00f22c1b1
commit 12873d1a67

View File

@@ -274,9 +274,8 @@ bool ConstStringTable::Encode(DataEncoder &encoder) {
encoder.AppendU8(0); // Start the string table with with an empty string.
for (auto s: m_strings) {
// Make sure all of the offsets match up with what we handed out!
const size_t stroff = encoder.GetByteSize() - strtab_offset;
auto pos = m_string_to_offset.find(s);
assert(pos->second == stroff);
assert(m_string_to_offset.find(s)->second ==
encoder.GetByteSize() - strtab_offset);
// Append the C string into the encoder
encoder.AppendCString(s.GetStringRef());
}