[lldb] Fix warning in MinidumpFileBuilder.cpp

Fixes the following warning:

$llvm_project/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp:744:11: warning:
format specifies type 'long' but the argument has type 'lldb::offset_t' (aka 'unsigned long long') [-Wformat]
          m_data.GetByteSize());
          ^~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Alex Langford 2021-09-13 10:34:31 -07:00
parent 6775ad2025
commit c4fa2c8aa4
1 changed files with 2 additions and 2 deletions

View File

@ -740,7 +740,7 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const {
if (error.Fail() || bytes_written != m_data.GetByteSize()) { if (error.Fail() || bytes_written != m_data.GetByteSize()) {
if (bytes_written != m_data.GetByteSize()) if (bytes_written != m_data.GetByteSize())
error.SetErrorStringWithFormat( error.SetErrorStringWithFormat(
"Unable to write the data. (written %ld/%ld).", bytes_written, "Unable to write the data. (written %ld/%llu).", bytes_written,
m_data.GetByteSize()); m_data.GetByteSize());
return error; return error;
} }
@ -767,4 +767,4 @@ size_t MinidumpFileBuilder::GetDirectoriesNum() const {
size_t MinidumpFileBuilder::GetCurrentDataEndOffset() const { size_t MinidumpFileBuilder::GetCurrentDataEndOffset() const {
return sizeof(llvm::minidump::Header) + m_data.GetByteSize(); return sizeof(llvm::minidump::Header) + m_data.GetByteSize();
} }