Windows: Fixed warnings in `duration.hpp`.

Captures the result of `std::ostream::precision` via its return type
`std::streamsize` rather than implicitly casting to `long`.

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


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

Branch: refs/heads/master
Commit: 4a91c1ed8c86ce2100dba24b321fc578ad3d0473
Parents: c0d93a3
Author: Daniel Pravat <dpra...@outlook.com>
Authored: Mon Sep 19 14:21:10 2016 -0700
Committer: Joseph Wu <josep...@apache.org>
Committed: Mon Sep 19 15:14:18 2016 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/duration.hpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4a91c1ed/3rdparty/stout/include/stout/duration.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/duration.hpp 
b/3rdparty/stout/include/stout/duration.hpp
index cd4f205..0a30a09 100644
--- a/3rdparty/stout/include/stout/duration.hpp
+++ b/3rdparty/stout/include/stout/duration.hpp
@@ -309,7 +309,8 @@ public:
 inline std::ostream& operator<<(std::ostream& stream, const Duration& 
duration_)
 {
   // Output the duration in full double precision and save the old precision.
-  long precision = stream.precision(std::numeric_limits<double>::digits10);
+  std::streamsize precision =
+    stream.precision(std::numeric_limits<double>::digits10);
 
   // Parse the duration as the sign and the absolute value.
   Duration duration = duration_;

Reply via email to