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

Compilation warnings on Windows. #7

Open
cheatfate opened this issue Nov 23, 2021 · 1 comment
Open

Compilation warnings on Windows. #7

cheatfate opened this issue Nov 23, 2021 · 1 comment

Comments

@cheatfate
Copy link
Contributor

cheatfate commented Nov 23, 2021

natpmp.c: In function 'sendpendingrequest':
natpmp.c:125:30: warning: pointer targets in passing argument 2 of 'send' differ in signedness [-Wpointer-sign]
  125 |         r = (int)send(p->s, p->pending_request, p->pending_request_len, 0);
      |                             ~^~~~~~~~~~~~~~~~~
      |                              |
      |                              unsigned char *
In file included from natpmp.c:39:
c:\system\mingw64\x86_64-w64-mingw32\include\winsock2.h:1027:60: note: expected 'const char *' but argument is of type 'unsigned char *'
 1027 |   WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
      |                                                ~~~~~~~~~~~~^~~
natpmp.c: In function 'readnatpmpresponse':
natpmp.c:213:28: warning: pointer targets in passing argument 2 of 'recvfrom' differ in signedness [-Wpointer-sign]
  213 |         n = recvfrom(p->s, buf, sizeof(buf), 0,
      |                            ^~~
      |                            |
      |                            unsigned char *
In file included from natpmp.c:39:
c:\system\mingw64\x86_64-w64-mingw32\include\winsock2.h:1023:58: note: expected 'char *' but argument is of type 'unsigned char *'
 1023 |   WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen);
      |                                                    ~~~~~~^~~
@stefantalpalaru
Copy link
Contributor

Upstream issue. Try https://github.com/miniupnp/libnatpmp for PRs and the forum for bug reports: https://miniupnp.tuxfamily.org/forum/viewforum.php?f=13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants