mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-11 14:36:27 +00:00
Fix MSVC build on 64-bit
Mostly int<->size_t implicit conversions. Warning 4366 (The result of the unary '&' operator may be unaligned) appears in minidump.cc:907, but I don't know why. It looks aligned to me. Change-Id: I641942adc324f8f9832b20662083dc83498688a8 Reviewed-on: https://chromium-review.googlesource.com/637390 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
committed by
Mike Frysinger
parent
005f41eb8c
commit
09df67311f
@@ -82,7 +82,7 @@ void ExceptionHandlerDeathTest::SetUp() {
|
||||
// The test case name is exposed as a c-style string,
|
||||
// convert it to a wchar_t string.
|
||||
int dwRet = MultiByteToWideChar(CP_ACP, 0, test_info->name(),
|
||||
strlen(test_info->name()),
|
||||
static_cast<int>(strlen(test_info->name())),
|
||||
test_name_wide,
|
||||
MAX_PATH);
|
||||
if (!dwRet) {
|
||||
@@ -293,8 +293,8 @@ wstring find_minidump_in_directory(const wstring &directory) {
|
||||
wstring filename;
|
||||
do {
|
||||
const wchar_t extension[] = L".dmp";
|
||||
const int extension_length = sizeof(extension) / sizeof(extension[0]) - 1;
|
||||
const int filename_length = wcslen(find_data.cFileName);
|
||||
const size_t extension_length = sizeof(extension) / sizeof(extension[0]) - 1;
|
||||
const size_t filename_length = wcslen(find_data.cFileName);
|
||||
if (filename_length > extension_length &&
|
||||
wcsncmp(extension,
|
||||
find_data.cFileName + filename_length - extension_length,
|
||||
|
||||
@@ -120,7 +120,7 @@ void ExceptionHandlerTest::SetUp() {
|
||||
// THe test case name is exposed to use as a c-style string,
|
||||
// But we might be working in UNICODE here on Windows.
|
||||
int dwRet = MultiByteToWideChar(CP_ACP, 0, test_info->name(),
|
||||
strlen(test_info->name()),
|
||||
static_cast<int>(strlen(test_info->name())),
|
||||
test_name_wide,
|
||||
MAX_PATH);
|
||||
if (!dwRet) {
|
||||
|
||||
@@ -93,7 +93,7 @@ class MinidumpTest: public testing::Test {
|
||||
STATUS_ACCESS_VIOLATION, // ExceptionCode
|
||||
0, // ExceptionFlags
|
||||
NULL, // ExceptionRecord;
|
||||
reinterpret_cast<void*>(0xCAFEBABE), // ExceptionAddress;
|
||||
reinterpret_cast<void*>(static_cast<uintptr_t>(0xCAFEBABE)), // ExceptionAddress;
|
||||
2, // NumberParameters;
|
||||
{ EXCEPTION_WRITE_FAULT, reinterpret_cast<ULONG_PTR>(this) }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user