http3: fix two build errors, silence warnings

* fix two build errors due to mismatch between function
  declarations and their definitions
* silence two mismatched signs warnings via casts

Approved-by: Daniel Stenberg
Closes #6093
This commit is contained in:
Viktor Szakats 2020-10-16 07:15:48 +00:00
parent 769c9a4eec
commit e34959c0b9
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
2 changed files with 5 additions and 4 deletions

View File

@ -41,7 +41,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn,
const struct sockaddr *addr,
socklen_t addrlen);
CURLcode Curl_quic_is_connected(struct connectdata *conn,
curl_socket_t sockfd,
int sockindex,
bool *connected);
int Curl_quic_ver(char *p, size_t len);
CURLcode Curl_quic_done_sending(struct connectdata *conn);

View File

@ -1715,7 +1715,8 @@ CURLcode Curl_quic_is_connected(struct connectdata *conn,
}
static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
static CURLcode ng_process_ingress(struct connectdata *conn,
curl_socket_t sockfd,
struct quicsocket *qs)
{
ssize_t recvd;
@ -1730,7 +1731,7 @@ static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
for(;;) {
remote_addrlen = sizeof(remote_addr);
while((recvd = recvfrom(sockfd, buf, bufsize, 0,
while((recvd = recvfrom(sockfd, (char *)buf, bufsize, 0,
(struct sockaddr *)&remote_addr,
&remote_addrlen)) == -1 &&
SOCKERRNO == EINTR)
@ -1870,7 +1871,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd,
}
memcpy(&remote_addr, ps.path.remote.addr, ps.path.remote.addrlen);
while((sent = send(sockfd, out, outlen, 0)) == -1 &&
while((sent = send(sockfd, (const char *)out, outlen, 0)) == -1 &&
SOCKERRNO == EINTR)
;