Loading adb/client/incremental.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -188,12 +188,8 @@ std::optional<Process> install(std::vector<std::string> files) { std::string adb_path = android::base::GetExecutablePath(); auto osh = adb_get_os_handle(connection_fd.get()); #ifdef _WIN32 auto fd_param = std::to_string(reinterpret_cast<intptr_t>(osh)); #else /* !_WIN32 a.k.a. Unix */ auto osh = cast_handle_to_int(adb_get_os_handle(connection_fd.get())); auto fd_param = std::to_string(osh); #endif // pipe for child process to write output int print_fds[2]; Loading @@ -202,7 +198,7 @@ std::optional<Process> install(std::vector<std::string> files) { return {}; } auto [pipe_read_fd, pipe_write_fd] = print_fds; auto pipe_write_fd_param = std::to_string(intptr_t(adb_get_os_handle(pipe_write_fd))); auto pipe_write_fd_param = std::to_string(cast_handle_to_int(adb_get_os_handle(pipe_write_fd))); close_on_exec(pipe_read_fd); std::vector<std::string> args(std::move(files)); Loading adb/client/pairing/pairing_client.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -141,11 +141,7 @@ bool PairingClientImpl::StartConnection() { cert_.size(), priv_key_.data(), priv_key_.size())); CHECK(connection_); #ifdef _WIN32 int osh = cast_handle_to_int(adb_get_os_handle(fd.release())); #else int osh = adb_get_os_handle(fd.release()); #endif if (!pairing_connection_start(connection_.get(), osh, OnPairingResult, this)) { LOG(ERROR) << "PairingClient failed to start the PairingConnection"; state_ = State::Stopped; Loading adb/sysdeps.h +4 −0 Original line number Diff line number Diff line Loading @@ -665,6 +665,10 @@ static __inline__ int adb_get_os_handle(borrowed_fd fd) { return fd.get(); } static __inline__ int cast_handle_to_int(int fd) { return fd; } // A very simple wrapper over a launched child process class Process { public: Loading adb/transport.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -500,12 +500,8 @@ bool FdConnection::DoTlsHandshake(RSA* key, std::string* auth_key) { auto x509 = GenerateX509Certificate(evp_pkey.get()); auto x509_str = X509ToPEMString(x509.get()); auto evp_str = Key::ToPEMString(evp_pkey.get()); #ifdef _WIN32 int osh = cast_handle_to_int(adb_get_os_handle(fd_)); #else int osh = adb_get_os_handle(fd_); #endif int osh = cast_handle_to_int(adb_get_os_handle(fd_)); #if ADB_HOST tls_ = TlsConnection::Create(TlsConnection::Role::Client, #else Loading Loading
adb/client/incremental.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -188,12 +188,8 @@ std::optional<Process> install(std::vector<std::string> files) { std::string adb_path = android::base::GetExecutablePath(); auto osh = adb_get_os_handle(connection_fd.get()); #ifdef _WIN32 auto fd_param = std::to_string(reinterpret_cast<intptr_t>(osh)); #else /* !_WIN32 a.k.a. Unix */ auto osh = cast_handle_to_int(adb_get_os_handle(connection_fd.get())); auto fd_param = std::to_string(osh); #endif // pipe for child process to write output int print_fds[2]; Loading @@ -202,7 +198,7 @@ std::optional<Process> install(std::vector<std::string> files) { return {}; } auto [pipe_read_fd, pipe_write_fd] = print_fds; auto pipe_write_fd_param = std::to_string(intptr_t(adb_get_os_handle(pipe_write_fd))); auto pipe_write_fd_param = std::to_string(cast_handle_to_int(adb_get_os_handle(pipe_write_fd))); close_on_exec(pipe_read_fd); std::vector<std::string> args(std::move(files)); Loading
adb/client/pairing/pairing_client.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -141,11 +141,7 @@ bool PairingClientImpl::StartConnection() { cert_.size(), priv_key_.data(), priv_key_.size())); CHECK(connection_); #ifdef _WIN32 int osh = cast_handle_to_int(adb_get_os_handle(fd.release())); #else int osh = adb_get_os_handle(fd.release()); #endif if (!pairing_connection_start(connection_.get(), osh, OnPairingResult, this)) { LOG(ERROR) << "PairingClient failed to start the PairingConnection"; state_ = State::Stopped; Loading
adb/sysdeps.h +4 −0 Original line number Diff line number Diff line Loading @@ -665,6 +665,10 @@ static __inline__ int adb_get_os_handle(borrowed_fd fd) { return fd.get(); } static __inline__ int cast_handle_to_int(int fd) { return fd; } // A very simple wrapper over a launched child process class Process { public: Loading
adb/transport.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -500,12 +500,8 @@ bool FdConnection::DoTlsHandshake(RSA* key, std::string* auth_key) { auto x509 = GenerateX509Certificate(evp_pkey.get()); auto x509_str = X509ToPEMString(x509.get()); auto evp_str = Key::ToPEMString(evp_pkey.get()); #ifdef _WIN32 int osh = cast_handle_to_int(adb_get_os_handle(fd_)); #else int osh = adb_get_os_handle(fd_); #endif int osh = cast_handle_to_int(adb_get_os_handle(fd_)); #if ADB_HOST tls_ = TlsConnection::Create(TlsConnection::Role::Client, #else Loading