Loading adb/adb_utils_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ TEST(adb_utils, adb_dirname) { EXPECT_EQ("/system/bin", adb_dirname("/system/bin/sh/")); } void test_mkdirs(const std::string basepath) { void test_mkdirs(const std::string& basepath) { // Test creating a directory hierarchy. EXPECT_TRUE(mkdirs(basepath)); // Test finding an existing directory hierarchy. Loading adb/commandline.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -1275,9 +1275,10 @@ static std::string find_product_out_path(const std::string& hint) { return hint; } // If there are any slashes in it, assume it's a relative path; // If any of the OS_PATH_SEPARATORS is found, assume it's a relative path; // make it absolute. if (hint.find_first_of(OS_PATH_SEPARATORS) != std::string::npos) { // NOLINT: Do not complain if OS_PATH_SEPARATORS has only one character. if (hint.find_first_of(OS_PATH_SEPARATORS) != std::string::npos) { // NOLINT std::string cwd; if (!getcwd(&cwd)) { fprintf(stderr, "adb: getcwd failed: %s\n", strerror(errno)); Loading adb/file_sync_client.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ class SyncConnection { typedef void (sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char* name); static bool sync_ls(SyncConnection& sc, const char* path, std::function<sync_ls_cb> func) { const std::function<sync_ls_cb>& func) { if (!sc.SendRequest(ID_LIST, path)) return false; while (true) { Loading fastboot/fastboot.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -835,7 +835,7 @@ static std::string verify_slot(Transport* transport, const char *slot) { } static void do_for_partition(Transport* transport, const char *part, const char *slot, std::function<void(const std::string&)> func, bool force_slot) { const std::function<void(const std::string&)>& func, bool force_slot) { std::string has_slot; std::string current_slot; Loading Loading @@ -867,7 +867,7 @@ static void do_for_partition(Transport* transport, const char *part, const char * partition does not support slots. */ static void do_for_partitions(Transport* transport, const char *part, const char *slot, std::function<void(const std::string&)> func, bool force_slot) { const std::function<void(const std::string&)>& func, bool force_slot) { std::string has_slot; if (slot && strcmp(slot, "all") == 0) { Loading fastboot/socket_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static constexpr int kTestTimeoutMs = 3000; // Creates connected sockets |server| and |client|. Returns true on success. bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Socket>* server, std::unique_ptr<Socket>* client, const std::string hostname = "localhost") { const std::string& hostname = "localhost") { *server = Socket::NewServer(protocol, 0); if (*server == nullptr) { ADD_FAILURE() << "Failed to create server."; Loading Loading
adb/adb_utils_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ TEST(adb_utils, adb_dirname) { EXPECT_EQ("/system/bin", adb_dirname("/system/bin/sh/")); } void test_mkdirs(const std::string basepath) { void test_mkdirs(const std::string& basepath) { // Test creating a directory hierarchy. EXPECT_TRUE(mkdirs(basepath)); // Test finding an existing directory hierarchy. Loading
adb/commandline.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -1275,9 +1275,10 @@ static std::string find_product_out_path(const std::string& hint) { return hint; } // If there are any slashes in it, assume it's a relative path; // If any of the OS_PATH_SEPARATORS is found, assume it's a relative path; // make it absolute. if (hint.find_first_of(OS_PATH_SEPARATORS) != std::string::npos) { // NOLINT: Do not complain if OS_PATH_SEPARATORS has only one character. if (hint.find_first_of(OS_PATH_SEPARATORS) != std::string::npos) { // NOLINT std::string cwd; if (!getcwd(&cwd)) { fprintf(stderr, "adb: getcwd failed: %s\n", strerror(errno)); Loading
adb/file_sync_client.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ class SyncConnection { typedef void (sync_ls_cb)(unsigned mode, unsigned size, unsigned time, const char* name); static bool sync_ls(SyncConnection& sc, const char* path, std::function<sync_ls_cb> func) { const std::function<sync_ls_cb>& func) { if (!sc.SendRequest(ID_LIST, path)) return false; while (true) { Loading
fastboot/fastboot.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -835,7 +835,7 @@ static std::string verify_slot(Transport* transport, const char *slot) { } static void do_for_partition(Transport* transport, const char *part, const char *slot, std::function<void(const std::string&)> func, bool force_slot) { const std::function<void(const std::string&)>& func, bool force_slot) { std::string has_slot; std::string current_slot; Loading Loading @@ -867,7 +867,7 @@ static void do_for_partition(Transport* transport, const char *part, const char * partition does not support slots. */ static void do_for_partitions(Transport* transport, const char *part, const char *slot, std::function<void(const std::string&)> func, bool force_slot) { const std::function<void(const std::string&)>& func, bool force_slot) { std::string has_slot; if (slot && strcmp(slot, "all") == 0) { Loading
fastboot/socket_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ static constexpr int kTestTimeoutMs = 3000; // Creates connected sockets |server| and |client|. Returns true on success. bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Socket>* server, std::unique_ptr<Socket>* client, const std::string hostname = "localhost") { const std::string& hostname = "localhost") { *server = Socket::NewServer(protocol, 0); if (*server == nullptr) { ADD_FAILURE() << "Failed to create server."; Loading