You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcc -W -Wall -lpthread -o httpd httpd.c
httpd.c: In function ‘startup’:
httpd.c:533:52: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness [-Wpointer-sign]
if (getsockname(httpd, (struct sockaddr *)&name, &namelen) == -1)
^
In file included from httpd.c:23:0:
/usr/include/sys/socket.h:127:12: note: expected ‘socklen_t * restrict {aka unsigned int * restrict}’ but argument is of type ‘int *’
extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
^
httpd.c: In function ‘main’:
httpd.c:591:24: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign]
&client_name_len);
^
In file included from httpd.c:23:0:
/usr/include/sys/socket.h:243:12: note: expected ‘socklen_t * restrict {aka unsigned int * restrict}’ but argument is of type ‘int *’
extern int accept (int __fd, __SOCKADDR_ARG __addr,
^
The text was updated successfully, but these errors were encountered:
这个编译警告可以解决吗?
The text was updated successfully, but these errors were encountered: