From: Evan Martin Date: Sat, 5 Jan 2013 18:49:48 +0000 (-0800) Subject: windows: add uint16 casts in depslog X-Git-Tag: v1.3.0~1^2~52^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9c24381c50506436212ac447a0805f5ff6892ac;p=platform%2Fupstream%2Fninja.git windows: add uint16 casts in depslog --- diff --git a/src/deps_log.cc b/src/deps_log.cc index de25f7b..da6cd93 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -59,7 +59,7 @@ bool DepsLog::RecordDeps(Node* node, TimeStamp mtime, RecordId(*i); } - uint16_t size = 4 * (1 + 1 + nodes.size()); + uint16_t size = 4 * (1 + 1 + (uint16_t)nodes.size()); size |= 0x8000; // Deps record: set high bit. fwrite(&size, 2, 1, file_); int id = node->id(); @@ -147,7 +147,7 @@ DepsLog::Deps* DepsLog::GetDeps(Node* node) { } bool DepsLog::RecordId(Node* node) { - uint16_t size = node->path().size(); + uint16_t size = (uint16_t)node->path().size(); fwrite(&size, 2, 1, file_); fwrite(node->path().data(), node->path().size(), 1, file_);