diff --git a/minidump/minidump_file_writer_test.cc b/minidump/minidump_file_writer_test.cc index 48931c31..fd880f6e 100644 --- a/minidump/minidump_file_writer_test.cc +++ b/minidump/minidump_file_writer_test.cc @@ -241,7 +241,7 @@ TEST(MinidumpFileWriter, ZeroLengthStream) { TEST(MinidumpFileWriter, InitializeFromSnapshot_Basic) { const uint32_t kSnapshotTime = 0x4976043c; - const timeval kSnapshotTimeval = { implicit_cast(kSnapshotTime), 0 }; + const timeval kSnapshotTimeval = { static_cast(kSnapshotTime), 0 }; TestProcessSnapshot process_snapshot; process_snapshot.SetSnapshotTime(kSnapshotTimeval); @@ -287,8 +287,15 @@ TEST(MinidumpFileWriter, InitializeFromSnapshot_Basic) { TEST(MinidumpFileWriter, InitializeFromSnapshot_Exception) { // In a 32-bit environment, this will give a “timestamp out of range” warning, // but the test should complete without failure. +#if defined(OS_WIN) && defined(ARCH_CPU_X86) +#pragma warning(push) +#pragma warning(disable: 4309) // Truncation of constant value. +#endif // OS_WIN && ARCH_CPU_X86 const uint32_t kSnapshotTime = 0xfd469ab8; - const timeval kSnapshotTimeval = { implicit_cast(kSnapshotTime), 0 }; + const timeval kSnapshotTimeval = { static_cast(kSnapshotTime), 0 }; +#if defined(OS_WIN) && defined(ARCH_CPU_X86) +#pragma warning(pop) +#endif // OS_WIN && ARCH_CPU_X86 TestProcessSnapshot process_snapshot; process_snapshot.SetSnapshotTime(kSnapshotTimeval); @@ -352,7 +359,7 @@ TEST(MinidumpFileWriter, InitializeFromSnapshot_Exception) { TEST(MinidumpFileWriter, InitializeFromSnapshot_CrashpadInfo) { const uint32_t kSnapshotTime = 0x15393bd3; - const timeval kSnapshotTimeval = { implicit_cast(kSnapshotTime), 0 }; + const timeval kSnapshotTimeval = { static_cast(kSnapshotTime), 0 }; TestProcessSnapshot process_snapshot; process_snapshot.SetSnapshotTime(kSnapshotTimeval); diff --git a/snapshot/test/test_exception_snapshot.h b/snapshot/test/test_exception_snapshot.h index 729f5f66..291f6c14 100644 --- a/snapshot/test/test_exception_snapshot.h +++ b/snapshot/test/test_exception_snapshot.h @@ -50,8 +50,8 @@ class TestExceptionSnapshot final : public ExceptionSnapshot { void SetThreadID(uint64_t thread_id) { thread_id_ = thread_id; } void SetException(uint32_t exception) { exception_ = exception; } - void SetExceptionInfo(uint32_t exception_info) { - exception_info_ = exception_info; + void SetExceptionInfo(uint32_t exception_information) { + exception_info_ = exception_information; } void SetExceptionAddress(uint64_t exception_address) { exception_address_ = exception_address;