[Lldb-commits] [lldb] r236323 - Fixed some compiler warnings because of bit-width mismatches.
Chaoren Lin
chaorenl at google.com
Fri May 1 09:58:18 PDT 2015
Author: chaoren
Date: Fri May 1 11:58:18 2015
New Revision: 236323
URL: http://llvm.org/viewvc/llvm-project?rev=236323&view=rev
Log:
Fixed some compiler warnings because of bit-width mismatches.
Modified:
lldb/trunk/source/Host/common/NativeRegisterContext.cpp
Modified: lldb/trunk/source/Host/common/NativeRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeRegisterContext.cpp?rev=236323&r1=236322&r2=236323&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeRegisterContext.cpp (original)
+++ lldb/trunk/source/Host/common/NativeRegisterContext.cpp Fri May 1 11:58:18 2015
@@ -375,7 +375,8 @@ NativeRegisterContext::ReadRegisterValue
if (src_len > dst_len)
{
- error.SetErrorStringWithFormat("%" PRIu64 " bytes is too big to store in register %s (%" PRIu64 " bytes)", (unsigned long long)src_len, reg_info->name, (unsigned long long)dst_len);
+ error.SetErrorStringWithFormat("%" PRIu64 " bytes is too big to store in register %s (%" PRIu64 " bytes)",
+ static_cast<uint64_t>(src_len), reg_info->name, static_cast<uint64_t>(dst_len));
return error;
}
@@ -398,7 +399,8 @@ NativeRegisterContext::ReadRegisterValue
if (bytes_read != src_len)
{
// This might happen if we read _some_ bytes but not all
- error.SetErrorStringWithFormat("read %" PRIu64 " of %" PRIu64 " bytes", (unsigned long long)bytes_read, (unsigned long long)src_len);
+ error.SetErrorStringWithFormat("read %" PRIu64 " of %" PRIu64 " bytes",
+ static_cast<uint64_t>(bytes_read), static_cast<uint64_t>(src_len));
return error;
}
@@ -470,7 +472,8 @@ NativeRegisterContext::WriteRegisterValu
if (bytes_written != bytes_copied)
{
// This might happen if we read _some_ bytes but not all
- error.SetErrorStringWithFormat("only wrote %" PRIu64 " of %" PRIu64 " bytes", (unsigned long long)bytes_written, (unsigned long long)bytes_copied);
+ error.SetErrorStringWithFormat("only wrote %" PRIu64 " of %" PRIu64 " bytes",
+ static_cast<uint64_t>(bytes_written), static_cast<uint64_t>(bytes_copied));
}
}
}
More information about the lldb-commits
mailing list