Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http3: fix two build errors, silence warnings #6093

Closed
wants to merge 1 commit into from

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Oct 15, 2020

  • fix two build errors due to mismatch between function
    declarations and their definitions.
  • silence two mismatched signs warnings via casts
vquic/ngtcp2.c:1690:10: error: conflicting types for 'Curl_quic_is_connected'
CURLcode Curl_quic_is_connected(struct connectdata *conn,
         ^
./quic.h:43:10: note: previous declaration is here
CURLcode Curl_quic_is_connected(struct connectdata *conn,
         ^
vquic/ngtcp2.c:1718:17: error: conflicting types for 'ng_process_ingress'
static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
                ^
vquic/ngtcp2.c:90:17: note: previous declaration is here
static CURLcode ng_process_ingress(struct connectdata *conn,
                ^
vquic/ngtcp2.c:1733:37: warning: passing 'uint8_t [65536]' to parameter of type 'char *' converts between pointers to integer types with different
      sign [-Wpointer-sign]
    while((recvd = recvfrom(sockfd, buf, bufsize, 0,
                                    ^~~
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winsock2.h:1023:58: note: passing argument to parameter 'buf' here
  WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen);
                                                         ^
vquic/ngtcp2.c:1873:32: warning: passing 'uint8_t [1252]' to parameter of type 'const char *' converts between pointers to integer types with
      different sign [-Wpointer-sign]
    while((sent = send(sockfd, out, outlen, 0)) == -1 &&
                               ^~~
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winsock2.h:1027:60: note: passing argument to parameter 'buf' here
  WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                                           ^
2 warnings and 2 errors generated.
- fix two build errors due to mismatch between function
  declarations and their definitions.
- silence two mismatched signs warnings via casts

```
vquic/ngtcp2.c:1690:10: error: conflicting types for 'Curl_quic_is_connected'
CURLcode Curl_quic_is_connected(struct connectdata *conn,
         ^
./quic.h:43:10: note: previous declaration is here
CURLcode Curl_quic_is_connected(struct connectdata *conn,
         ^
vquic/ngtcp2.c:1718:17: error: conflicting types for 'ng_process_ingress'
static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
                ^
vquic/ngtcp2.c:90:17: note: previous declaration is here
static CURLcode ng_process_ingress(struct connectdata *conn,
                ^
vquic/ngtcp2.c:1733:37: warning: passing 'uint8_t [65536]' to parameter of type 'char *' converts between pointers to integer types with different
      sign [-Wpointer-sign]
    while((recvd = recvfrom(sockfd, buf, bufsize, 0,
                                    ^~~
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winsock2.h:1023:58: note: passing argument to parameter 'buf' here
  WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen);
                                                         ^
vquic/ngtcp2.c:1873:32: warning: passing 'uint8_t [1252]' to parameter of type 'const char *' converts between pointers to integer types with
      different sign [-Wpointer-sign]
    while((sent = send(sockfd, out, outlen, 0)) == -1 &&
                               ^~~
/usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winsock2.h:1027:60: note: passing argument to parameter 'buf' here
  WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
                                                           ^
2 warnings and 2 errors generated.
```
@bagder
bagder approved these changes Oct 15, 2020
@vszakats vszakats closed this in e34959c Oct 16, 2020
@vszakats vszakats deleted the vszakats:http3ew branch Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.