diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2021-12-17 16:05:40 +0100 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2021-12-17 16:07:02 +0100 |
| commit | 12873d1a670b4a82b5853dabc8b6ea4d300759af (patch) | |
| tree | 26a3b475526998336931caf5fb5309e9beaadbe4 | |
| parent | e00f22c1b1a3c64feee290804623478416803b7a (diff) | |
| download | llvm-12873d1a670b4a82b5853dabc8b6ea4d300759af.zip llvm-12873d1a670b4a82b5853dabc8b6ea4d300759af.tar.gz llvm-12873d1a670b4a82b5853dabc8b6ea4d300759af.tar.bz2 | |
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;
^
| -rw-r--r-- | lldb/source/Core/DataFileCache.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Core/DataFileCache.cpp b/lldb/source/Core/DataFileCache.cpp index 8d4dba3..3f52b92 100644 --- a/lldb/source/Core/DataFileCache.cpp +++ b/lldb/source/Core/DataFileCache.cpp @@ -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()); } |
