diff options
author | 2021-12-02 20:09:05 +0000 | |
---|---|---|
committer | 2021-12-02 21:26:30 +0000 | |
commit | 2a79da0acab61b76fc280d4d6921aec4416f21d4 (patch) | |
tree | 523fc09e5ad65c7e781cd30cff0eca4884745b82 | |
parent | 984d729aaef179d641c53afa6c49a168128402fa (diff) |
Fix build warnings
Remove some nits and obsolete declarations to fix all the compiler
warnings.
Bug: 202785178
Test: m
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I0407bafbb0b3f66887ac163dba441285a58ca26d
-rwxr-xr-x | jni/FuseDaemon.cpp | 2 | ||||
-rw-r--r-- | jni/FuseUtils.cpp | 2 | ||||
-rw-r--r-- | jni/FuseUtilsTest.cpp | 4 | ||||
-rw-r--r-- | jni/MediaProviderWrapper.cpp | 1 | ||||
-rw-r--r-- | jni/RedactionInfoTest.cpp | 5 | ||||
-rw-r--r-- | jni/node_test.cpp | 1 |
6 files changed, 7 insertions, 8 deletions
diff --git a/jni/FuseDaemon.cpp b/jni/FuseDaemon.cpp index f0797a0f3..cf9298e39 100755 --- a/jni/FuseDaemon.cpp +++ b/jni/FuseDaemon.cpp @@ -51,7 +51,6 @@ #include <unistd.h> #include <iostream> -#include <list> #include <map> #include <mutex> #include <queue> @@ -72,7 +71,6 @@ using mediaprovider::fuse::dirhandle; using mediaprovider::fuse::handle; using mediaprovider::fuse::node; using mediaprovider::fuse::RedactionInfo; -using std::list; using std::string; using std::vector; diff --git a/jni/FuseUtils.cpp b/jni/FuseUtils.cpp index 1758151e6..7b0816488 100644 --- a/jni/FuseUtils.cpp +++ b/jni/FuseUtils.cpp @@ -35,7 +35,7 @@ bool containsMount(const string& path) { return false; } - size_t pos = path.find_first_of("/", prefix.length()); + size_t pos = path.find_first_of('/', prefix.length()); if (pos == std::string::npos) { return false; } diff --git a/jni/FuseUtilsTest.cpp b/jni/FuseUtilsTest.cpp index a46c3a81e..d76a89c6f 100644 --- a/jni/FuseUtilsTest.cpp +++ b/jni/FuseUtilsTest.cpp @@ -20,7 +20,7 @@ #include <gtest/gtest.h> -using namespace mediaprovider::fuse; +namespace mediaprovider::fuse { TEST(FuseUtilsTest, testContainsMount_isTrueForAndroidDataObb) { EXPECT_TRUE(containsMount("/storage/emulated/1234/Android")); @@ -58,3 +58,5 @@ TEST(FuseUtilsTest, testContainsMount_isFalseForPathWithAdditionalSlash) { EXPECT_FALSE(containsMount("/storage/emulated//1234/Android/data")); EXPECT_FALSE(containsMount("/storage/emulated/1234//Android/data")); } + +} // namespace mediaprovider::fuse diff --git a/jni/MediaProviderWrapper.cpp b/jni/MediaProviderWrapper.cpp index 9a3f059ec..253dbbef7 100644 --- a/jni/MediaProviderWrapper.cpp +++ b/jni/MediaProviderWrapper.cpp @@ -31,7 +31,6 @@ namespace mediaprovider { namespace fuse { -using android::base::GetBoolProperty; using std::string; namespace { diff --git a/jni/RedactionInfoTest.cpp b/jni/RedactionInfoTest.cpp index 76eec130a..3a7bd27ff 100644 --- a/jni/RedactionInfoTest.cpp +++ b/jni/RedactionInfoTest.cpp @@ -24,9 +24,8 @@ #include "libfuse_jni/RedactionInfo.h" -using namespace mediaprovider::fuse; +namespace mediaprovider::fuse { -using std::unique_ptr; using std::vector; std::ostream& operator<<(std::ostream& os, const ReadRange& rr) { @@ -381,3 +380,5 @@ TEST(RedactionInfoTest, testSingleRedactionRangesZeroSize) { info.getReadRanges(0, 40, &out); // read offsets [0, 40) EXPECT_EQ(0, out.size()); } + +} // namespace mediaprovider::fuse diff --git a/jni/node_test.cpp b/jni/node_test.cpp index d0c86dfbe..9122fc8b5 100644 --- a/jni/node_test.cpp +++ b/jni/node_test.cpp @@ -7,7 +7,6 @@ #include <memory> #include <mutex> -using mediaprovider::fuse::dirhandle; using mediaprovider::fuse::handle; using mediaprovider::fuse::node; using mediaprovider::fuse::NodeTracker; |