Commit 2209d5e4 authored by pkasting's avatar pkasting Committed by Commit bot

Misc. warning fixes/cleanup

BUG=81439
TEST=none

Review URL: https://codereview.chromium.org/777853003

Cr-Commit-Position: refs/heads/master@{#308182}
parent fc41a66c
......@@ -46,7 +46,7 @@ int32 Duration::InMilliseconds() const { return ms_; }
TrackedTime::TrackedTime() : ms_(0) {}
TrackedTime::TrackedTime(int32 ms) : ms_(ms) {}
TrackedTime::TrackedTime(const base::TimeTicks& time)
: ms_((time - base::TimeTicks()).InMilliseconds()) {
: ms_(static_cast<int32>((time - base::TimeTicks()).InMilliseconds())) {
}
// static
......
......@@ -60,10 +60,6 @@ class WorkerThreadTicker {
tick_interval_ = base::TimeDelta::FromMilliseconds(tick_interval);
}
int tick_interval() const {
return tick_interval_.InMilliseconds();
}
private:
void ScheduleTimerTask();
......
......@@ -824,7 +824,7 @@ void NaClIPCAdapter::SaveMessage(const IPC::Message& msg,
header.routing = msg.routing_id();
header.type = msg.type();
header.flags = msg.flags();
header.num_fds = static_cast<int>(rewritten_msg->desc_count());
header.num_fds = static_cast<uint16>(rewritten_msg->desc_count());
rewritten_msg->SetData(header, msg.payload(), msg.payload_size());
locked_data_.to_be_received_.push(rewritten_msg);
......
......@@ -92,7 +92,8 @@ bool CorruptSizeInHeader(const base::FilePath& db_path) {
const unsigned page_size = ReadBigEndian(header + kPageSizeOffset, 2);
// One larger than the expected size.
const unsigned page_count = (db_size + page_size) / page_size;
const unsigned page_count =
static_cast<unsigned>((db_size + page_size) / page_size);
WriteBigEndian(page_count, header + kPageCountOffset, 4);
// Update change count so outstanding readers know the info changed.
......@@ -212,7 +213,7 @@ bool CountTableRows(sql::Connection* db, const char* table, size_t* count) {
if (!s.Step())
return false;
*count = s.ColumnInt64(0);
*count = static_cast<size_t>(s.ColumnInt64(0));
return true;
}
......
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