Commit a3fbeb9a authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

status_collector: cast time_t for printing

time_t's backing type isn't always 64 bits. In order to format it as an
int64, a cast is necessary.

Bug: 1058218
Change-Id: Iab600b212e3e83736cbeb0a0a01bf4698aa66317
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096106Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749199}
parent 285d45b5
......@@ -2816,7 +2816,8 @@ TEST_F(DeviceStatusCollectorTest, TestCrashReportInfo_LegacyCSV) {
// Create a test uploads.log file in the legacy CSV format. All such kind of
// record will be ignored because the required source filed is not existing.
base::Time timestamp = base::Time::Now() - base::TimeDelta::FromHours(1);
std::string test_entry = base::StringPrintf("%" PRId64, timestamp.ToTimeT());
std::string test_entry =
base::StringPrintf("%" PRId64, static_cast<int64_t>(timestamp.ToTimeT()));
test_entry += ",";
test_entry.append(kTestUploadId);
test_entry += ",";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment