mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 05:35:39 +01:00
Fix warnings from the Windows build.
These warnings are fatal in my GYP-generated debug build. The warnings can be seen on Linux/Mac with -Wshorten-64-to-32. R=mark@chromium.org Review URL: https://breakpad.appspot.com/944002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1264 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
53a689933f
commit
6199766d99
@ -603,7 +603,6 @@ bool MinidumpContext::Read(uint32_t expected_size) {
|
||||
}
|
||||
|
||||
context_.ppc64 = context_ppc64.release();
|
||||
context_flags_ = context_flags;
|
||||
} else if (expected_size == sizeof(MDRawContextARM64)) {
|
||||
// |context_flags| of MDRawContextARM64 is 64 bits, but other MDRawContext
|
||||
// in the else case have 32 bits |context_flags|, so special case it here.
|
||||
@ -678,8 +677,17 @@ bool MinidumpContext::Read(uint32_t expected_size) {
|
||||
Swap(&context_arm64->float_save.regs[fpr_index]);
|
||||
}
|
||||
}
|
||||
context_flags_ = static_cast<uint32_t>(context_arm64->context_flags);
|
||||
|
||||
// Check for data loss when converting context flags from uint64_t into
|
||||
// uint32_t
|
||||
if (static_cast<uint64_t>(context_flags_) !=
|
||||
context_arm64->context_flags) {
|
||||
BPLOG(ERROR) << "Data loss detected when converting ARM64 context_flags";
|
||||
return false;
|
||||
}
|
||||
|
||||
context_.arm64 = context_arm64.release();
|
||||
context_flags_ = context_flags;
|
||||
} else {
|
||||
uint32_t context_flags;
|
||||
if (!minidump_->ReadBytes(&context_flags, sizeof(context_flags))) {
|
||||
|
Loading…
Reference in New Issue
Block a user