Chromium Code Reviews| Index: native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc |
| diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc b/native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc |
| index 5ae7095d923aa053f70d842110cfb56a3143680e..1b734f91155bc6d0e114deac37c24afedbccf0d8 100644 |
| --- a/native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc |
| +++ b/native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc |
| @@ -42,7 +42,7 @@ Error MountNodeMem::Read(const HandleAttr& attr, |
| size_t size = stat_.st_size; |
| - if (attr.offs + count > size) { |
| + if (attr.offs + count > static_cast<size_t>(size)) { |
|
binji
2013/11/15 17:26:23
Why is this necessary? size is already a size_t.
Sam Clegg
2013/11/15 18:13:34
Done.
|
| count = size - attr.offs; |
| } |
| @@ -61,7 +61,7 @@ Error MountNodeMem::Write(const HandleAttr& attr, |
| if (count == 0) |
| return 0; |
| - if (count + attr.offs > stat_.st_size) { |
| + if (count + attr.offs > static_cast<size_t>(stat_.st_size)) { |
| Resize(count + attr.offs); |
| count = stat_.st_size - attr.offs; |
| } |
| @@ -78,7 +78,7 @@ Error MountNodeMem::FTruncate(off_t new_size) { |
| } |
| void MountNodeMem::Resize(off_t new_size) { |
| - if (new_size > data_.capacity()) { |
| + if (new_size > static_cast<off_t>(data_.capacity())) { |
| // While the node size is small, grow exponentially. When it starts to get |
| // larger, grow linearly. |
| size_t extra = std::min<size_t>(new_size, kMaxResizeIncrement); |