You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/03/21 04:47:25 UTC

mesos git commit: Fixed `redundant c_str()` warnings.

Repository: mesos
Updated Branches:
  refs/heads/master bc4a015db -> 79f07bfba


Fixed `redundant c_str()` warnings.

clang-tidy warns about the unnecessary use of `std::string::c_str()`
when passing a `std::string` to a function that takes a `std::string`.
It's right, we don't need the extra conversions in this case.


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

Branch: refs/heads/master
Commit: 79f07bfba46fe665b432431359ebb3e6b6b10016
Parents: bc4a015
Author: James Peach <jp...@apache.org>
Authored: Tue Mar 20 21:45:39 2018 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Mar 20 21:45:39 2018 -0700

----------------------------------------------------------------------
 src/tests/files_tests.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/79f07bfb/src/tests/files_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/files_tests.cpp b/src/tests/files_tests.cpp
index b6a87ec..4286e58 100644
--- a/src/tests/files_tests.cpp
+++ b/src/tests/files_tests.cpp
@@ -337,18 +337,18 @@ TEST_F(FilesTest, BrowseTest)
   JSON::Array expected;
 
   // TODO(johnkord): As per MESOS-8275, we don't want to use stat on Windows.
-  ASSERT_EQ(0, stat(path::join("1", "2").c_str(), &s));
+  ASSERT_EQ(0, ::stat(path::join("1", "2").c_str(), &s));
   expected.values.push_back(
-      model(protobuf::createFileInfo(path::join("one", "2").c_str(), s)));
-  ASSERT_EQ(0, stat(path::join("1", "3").c_str(), &s));
+      model(protobuf::createFileInfo(path::join("one", "2"), s)));
+  ASSERT_EQ(0, ::stat(path::join("1", "3").c_str(), &s));
   expected.values.push_back(
-      model(protobuf::createFileInfo(path::join("one", "3").c_str(), s)));
-  ASSERT_EQ(0, stat(path::join("1", "three").c_str(), &s));
+      model(protobuf::createFileInfo(path::join("one", "3"), s)));
+  ASSERT_EQ(0, ::stat(path::join("1", "three").c_str(), &s));
   expected.values.push_back(
-      model(protobuf::createFileInfo(path::join("one", "three").c_str(), s)));
-  ASSERT_EQ(0, stat(path::join("1", "two").c_str(), &s));
+      model(protobuf::createFileInfo(path::join("one", "three"), s)));
+  ASSERT_EQ(0, ::stat(path::join("1", "two").c_str(), &s));
   expected.values.push_back(
-      model(protobuf::createFileInfo(path::join("one", "two").c_str(), s)));
+      model(protobuf::createFileInfo(path::join("one", "two"), s)));
 
   Future<Response> response =
       process::http::get(upid, "browse", "path=one/");