Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: minidump/minidump_misc_info_writer.cc

Issue 883773005: win: Work towards getting 'minidump' to compile (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crash-report-db-win
Patch Set: more mucking around Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « minidump/minidump_misc_info_writer.h ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_misc_info_writer.cc
diff --git a/minidump/minidump_misc_info_writer.cc b/minidump/minidump_misc_info_writer.cc
index a839ab04f3b0961cd60a4f28385289b2ac7f5af2..4d3b143548889a82edceaaf9170d2f066ac3bb3a 100644
--- a/minidump/minidump_misc_info_writer.cc
+++ b/minidump/minidump_misc_info_writer.cc
@@ -39,7 +39,7 @@ namespace {
uint32_t TimevalToRoundedSeconds(const timeval& tv) {
uint32_t seconds =
InRangeCast<uint32_t>(tv.tv_sec, std::numeric_limits<uint32_t>::max());
- const int kMicrosecondsPerSecond = 1E6;
+ const int kMicrosecondsPerSecond = static_cast<int>(1E6);
if (tv.tv_usec >= kMicrosecondsPerSecond / 2 &&
seconds != std::numeric_limits<uint32_t>::max()) {
++seconds;
@@ -101,6 +101,8 @@ std::string MinidumpMiscInfoDebugBuildString() {
const char kOS[] = "mac";
#elif defined(OS_LINUX)
const char kOS[] = "linux";
+#elif defined(OS_WIN)
+ const char kOS[] = "win";
#else
#error define kOS for this operating system
#endif
@@ -150,7 +152,7 @@ void MinidumpMiscInfoWriter::InitializeFromSnapshot(
uint64_t current_mhz;
uint64_t max_mhz;
system_snapshot->CPUFrequency(&current_mhz, &max_mhz);
- const uint32_t kHzPerMHz = 1E6;
+ const uint32_t kHzPerMHz = static_cast<const uint32_t>(1E6);
SetProcessorPowerInfo(
InRangeCast<uint32_t>(current_mhz / kHzPerMHz,
std::numeric_limits<uint32_t>::max()),
« no previous file with comments | « minidump/minidump_misc_info_writer.h ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698