Opened 3 years ago
Closed 3 years ago
#63302 closed defect (fixed)
pop3proxy @2.0.0-beta8: error: implicit declaration of function 'inet_ntoa' is invalid in C99
Reported by: | cooljeanius (Eric Gallager) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | bigsur catalina | Cc: | |
Port: | pop3proxy |
Description
Another victim of -Werror=implicit-function-declaration
being on by default now:
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_pop3proxy/pop3proxy/work/pop3proxy-2.0.0-beta8' /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o main.o main.c /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o pop3.o pop3.c /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o clamav.o clamav.c /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o procinfo.o procinfo.c /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o ip-lib.o ip-lib.c /usr/bin/clang -arch x86_64 -ggdb -Wall -D'VERSION="2.0.0-beta8"' -c -o lib.o lib.c ip-lib.c:52:51: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getsockname(pfd, (struct sockaddr *) &saddr, &size) < 0) ^~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/socket.h:706:78: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ip-lib.c:55:36: error: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Werror,-Wimplicit-function-declaration] copy_string(sock->ipnum, (char *) inet_ntoa(saddr.sin_addr), sizeof(sock->ipnum)); ^ ip-lib.c:55:27: warning: cast to 'char *' from smaller integer type 'int' [-Wint-to-pointer-cast] copy_string(sock->ipnum, (char *) inet_ntoa(saddr.sin_addr), sizeof(sock->ipnum)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib.c:78:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] ip-lib.c:226:60: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if ((connect = accept(sock, (struct sockaddr *) &client, &len)) < 0) { ^~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/socket.h:700:73: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ip-lib.c:277:53: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] rc = getpeername(pfd, (struct sockaddr *) &saddr, &size); ^~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/socket.h:704:78: note: passing argument to parameter here int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ip-lib.c:279:53: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] rc = getsockname(pfd, (struct sockaddr *) &saddr, &size); ^~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/socket.h:706:78: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ip-lib.c:293:30: error: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Werror,-Wimplicit-function-declaration] copy_string(ipnum, (char *) inet_ntoa(saddr.sin_addr), ipsize); ^ upper[c = (unsigned char) '<E4>'] = '<C4>'; ^ ip-lib.c:293:21: warning: cast to 'char *' from smaller integer type 'int' [-Wint-to-pointer-cast] lib.c:78:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] copy_string(ipnum, (char *) inet_ntoa(saddr.sin_addr), ipsize); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ upper[c = (unsigned char) '<E4>'] = '<C4>'; ^ lib.c:79:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] upper[c = (unsigned char) '<F6>'] = '<D6>'; ^ lib.c:79:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] upper[c = (unsigned char) '<F6>'] = '<D6>'; ^ lib.c:80:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] upper[c = (unsigned char) '<FC>'] = '<DC>'; ^ lib.c:80:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] upper[c = (unsigned char) '<FC>'] = '<DC>'; ^ lib.c:99:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<C4>'] = '<E4>'; ^ lib.c:99:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<C4>'] = '<E4>'; ^ lib.c:100:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<D6>'] = '<F6>'; ^ lib.c:100:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<D6>'] = '<F6>'; ^ lib.c:101:28: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<DC>'] = '<FC>'; ^ lib.c:101:35: warning: illegal character encoding in character literal [-Winvalid-source-encoding] lower[c = (unsigned char) '<DC>'] = '<FC>'; ^ lib.c:148:4: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p = string; ^ ~~~~~~ 6 warnings and 2 errors generated. lib.c:164:4: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p = string; ^ ~~~~~~ lib.c:187:9: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] if ((p = buffer) == NULL) ^ ~~~~~~ lib.c:190:15: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] len = strlen(p); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/string.h:82:28: note: passing argument to parameter '__s' here size_t strlen(const char *__s); ^ lib.c:198:9: warning: returning 'unsigned char *' from a function with result type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] return (p); ^~~ clamav.c:372:22: warning: passing 'unsigned long *' to parameter of type 'const time_t *' (aka 'const long *') converts between pointers to integer types with different sign [-Wpointer-sign] tm = *localtime(&now); ^~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/time.h:114:36: note: passing argument to parameter here struct tm *localtime(const time_t *); ^ lib.c:211:6: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *(p = to) = k = 0; ^ ~~ clamav.c:419:20: warning: passing 'unsigned long *' to parameter of type 'const time_t *' (aka 'const long *') converts between pointers to integer types with different sign [-Wpointer-sign] tm = *localtime(&now); ^~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/time.h:114:36: note: passing argument to parameter here struct tm *localtime(const time_t *); ^ make: *** [ip-lib.o] Error 1 make: *** Waiting for unfinished jobs.... 18 warnings generated. 2 warnings generated. make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_pop3proxy/pop3proxy/work/pop3proxy-2.0.0-beta8' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_pop3proxy/pop3proxy/work/pop3proxy-2.0.0-beta8" && /usr/bin/make -j16 -w all CC="/usr/bin/clang -arch x86_64" Exit code: 2 Error: Failed to build pop3proxy: command execution failed DEBUG: Error code: CHILDSTATUS 84432 2
Change History (1)
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In 2b64670b04a33513b5a4458fc847ede7a7599532/macports-ports (master):