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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_mem.cc

Issue 73083005: [NaCl SDK] Enable linux host build for nacl_io and nacl_io_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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);

Powered by Google App Engine
This is Rietveld 408576698