You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/09/27 00:03:57 UTC

[05/11] mesos git commit: Fixed warnings in `process/system.hpp`.

Fixed warnings in `process/system.hpp`.

There was an implicit conversion from `uint64_t` to `double`.

Review: https://reviews.apache.org/r/52200/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3e4c3a98
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3e4c3a98
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3e4c3a98

Branch: refs/heads/master
Commit: 3e4c3a982a057c21e9e854c97134d1142856f3aa
Parents: dda9684
Author: Daniel Pravat <dp...@outlook.com>
Authored: Mon Sep 26 14:01:08 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Sep 26 15:19:01 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/system.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3e4c3a98/3rdparty/libprocess/include/process/system.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/system.hpp b/3rdparty/libprocess/include/process/system.hpp
index 2a61b8e..21bd330 100644
--- a/3rdparty/libprocess/include/process/system.hpp
+++ b/3rdparty/libprocess/include/process/system.hpp
@@ -143,7 +143,7 @@ private:
   {
     Try<os::Memory> memory = os::memory();
     if (memory.isSome()) {
-      return memory.get().total.bytes();
+      return static_cast<double>(memory.get().total.bytes());
     }
     return Failure("Failed to get memory: " + memory.error());
   }
@@ -153,7 +153,7 @@ private:
   {
     Try<os::Memory> memory = os::memory();
     if (memory.isSome()) {
-      return memory.get().free.bytes();
+      return static_cast<double>(memory.get().free.bytes());
     }
     return Failure("Failed to get memory: " + memory.error());
   }