]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http3: fix two build errors, silence warnings
authorViktor Szakats <commit@vsz.me>
Fri, 16 Oct 2020 07:15:48 +0000 (07:15 +0000)
committerViktor Szakats <commit@vsz.me>
Fri, 16 Oct 2020 07:15:48 +0000 (07:15 +0000)
* 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

lib/quic.h
lib/vquic/ngtcp2.c

index 8e7df90eac02501d17fac4311ab2aaef7b955014..de6b5825d8e5fa46e33a362c66d08e54a9c32093 100644 (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);
index c076b7c3e7d0346b7a84b522a0140b81403c3d7d..526d9383f1d19bc9e069fdd0d1cb1d3a47ac1500 100644 (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)
       ;