Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6882611 authored by donghongweng's avatar donghongweng Committed by Donghong Weng
Browse files

Fix unqualified-std-cast-call compiler warning

Test: "m" and "m tests"
Change-Id: I95a1c0b6babdb3c5081f6112635e0df727428c09
parent c6a574d5
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -681,9 +681,9 @@ DnsProxyListener::GetAddrInfoHandler::GetAddrInfoHandler(SocketClient* c, std::s
                                                         std::unique_ptr<addrinfo> hints,
                                                         std::unique_ptr<addrinfo> hints,
                                                         const android_net_context& netcontext)
                                                         const android_net_context& netcontext)
    : Handler(c),
    : Handler(c),
      mHost(move(host)),
      mHost(std::move(host)),
      mService(move(service)),
      mService(std::move(service)),
      mHints(move(hints)),
      mHints(std::move(hints)),
      mNetContext(netcontext) {}
      mNetContext(netcontext) {}


static bool evaluate_domain_name(const android_net_context& netcontext, const char* host) {
static bool evaluate_domain_name(const android_net_context& netcontext, const char* host) {
@@ -954,7 +954,7 @@ int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient* cli, int argc, ch
        hints->ai_protocol = ai_protocol;
        hints->ai_protocol = ai_protocol;
    }
    }


    (new GetAddrInfoHandler(cli, name, service, move(hints), netcontext))->spawn();
    (new GetAddrInfoHandler(cli, name, service, std::move(hints), netcontext))->spawn();
    return 0;
    return 0;
}
}


@@ -1202,7 +1202,7 @@ int DnsProxyListener::GetHostByNameCmd::runCommand(SocketClient* cli, int argc,
DnsProxyListener::GetHostByNameHandler::GetHostByNameHandler(SocketClient* c, std::string name,
DnsProxyListener::GetHostByNameHandler::GetHostByNameHandler(SocketClient* c, std::string name,
                                                             int af,
                                                             int af,
                                                             const android_net_context& netcontext)
                                                             const android_net_context& netcontext)
    : Handler(c), mName(move(name)), mAf(af), mNetContext(netcontext) {}
    : Handler(c), mName(std::move(name)), mAf(af), mNetContext(netcontext) {}


void DnsProxyListener::GetHostByNameHandler::doDns64Synthesis(int32_t* rv, hostent* hbuf, char* buf,
void DnsProxyListener::GetHostByNameHandler::doDns64Synthesis(int32_t* rv, hostent* hbuf, char* buf,
                                                              size_t buflen, struct hostent** hpp,
                                                              size_t buflen, struct hostent** hpp,
+1 −1
Original line number Original line Diff line number Diff line
@@ -885,7 +885,7 @@ bool DNSResponder::fillRdata(const std::string& rdatastr, DNSRecord& record) {
            LOG(ERROR) << "invalid name length";
            LOG(ERROR) << "invalid name length";
            return false;
            return false;
        }
        }
        record.rdata = move(rdata);
        record.rdata = std::move(rdata);
    } else {
    } else {
        LOG(ERROR) << "unhandled qtype " << dnstype2str(record.rtype);
        LOG(ERROR) << "unhandled qtype " << dnstype2str(record.rtype);
        return false;
        return false;
+1 −1
Original line number Original line Diff line number Diff line
@@ -215,7 +215,7 @@ class DNSResponder {
        std::string name;
        std::string name;
        unsigned type;
        unsigned type;


        QueryKey(std::string n, unsigned t) : name(move(n)), type(t) {}
        QueryKey(std::string n, unsigned t) : name(std::move(n)), type(t) {}
        bool operator==(const QueryKey& o) const { return name == o.name && type == o.type; }
        bool operator==(const QueryKey& o) const { return name == o.name && type == o.type; }
        bool operator<(const QueryKey& o) const {
        bool operator<(const QueryKey& o) const {
            if (name < o.name) return true;
            if (name < o.name) return true;