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/12/03 00:13:16 UTC

[4/5] mesos git commit: Windows: Fixed warnings in `getcwd.hpp`.

Windows: Fixed warnings in `getcwd.hpp`.

This removes an implicit cast from unsigned to signed int.

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


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

Branch: refs/heads/master
Commit: e282adf33ac7f695d9c8454cb4dd705bc7fb2fd3
Parents: b763ee6
Author: Daniel Pravat <dp...@outlook.com>
Authored: Fri Dec 2 15:47:39 2016 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Dec 2 15:52:12 2016 -0800

----------------------------------------------------------------------
 3rdparty/stout/include/stout/windows.hpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e282adf3/3rdparty/stout/include/stout/windows.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows.hpp b/3rdparty/stout/include/stout/windows.hpp
index c384026..d89c709 100644
--- a/3rdparty/stout/include/stout/windows.hpp
+++ b/3rdparty/stout/include/stout/windows.hpp
@@ -33,6 +33,8 @@
 
 #include <memory>
 
+#include <glog/logging.h>
+
 
 #ifdef _UNICODE
 // Much of the core Windows API is available both in `string` and `wstring`
@@ -346,10 +348,10 @@ decltype(_chdir(path))
 }
 
 
-inline auto getcwd(char* path, int maxlen) ->
-decltype(_getcwd(path, maxlen))
+inline char * getcwd(char* path, size_t maxlen)
 {
-  return _getcwd(path, maxlen);
+  CHECK_LE(maxlen, INT_MAX);
+  return _getcwd(path, static_cast<int>(maxlen));
 }