Fix size_t to int conversion.
authorAndré Baixo <baixo@google.com>
Thu, 13 Nov 2014 17:28:22 +0000 (17:28 +0000)
committerRoss McIlroy <rmcilroy@google.com>
Thu, 13 Nov 2014 17:28:36 +0000 (17:28 +0000)
BUG=421063
LOG=N
R=vogelheim@chromium.org

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

Patch from André Baixo <baixo@google.com>.

Cr-Commit-Position: refs/heads/master@{#25340}

src/d8.cc

index 8b4adf0..fd80fcd 100644 (file)
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1625,9 +1625,9 @@ class StartupDataHandler {
     rewind(file);
 
     startup_data->data = new char[startup_data->raw_size];
-    startup_data->compressed_size = fread(
-        const_cast<char*>(startup_data->data), 1, startup_data->raw_size,
-        file);
+    startup_data->compressed_size =
+        static_cast<int>(fread(const_cast<char*>(startup_data->data), 1,
+                               startup_data->raw_size, file));
     fclose(file);
 
     if (startup_data->raw_size == startup_data->compressed_size)