Opened 4 years ago
Closed 4 years ago
#62336 closed defect (fixed)
chgrep @1.2.4_1: error: implicit declaration of function 'err_msg' is invalid in C99
Reported by: | cooljeanius (Eric Gallager) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | bigsur catalina | Cc: | |
Port: | chgrep |
Description
Another victim of -Werror=implicit-function-declaration being on by default now:
Making all in src make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_chgrep/chgrep/work/chgrep-1.2.4/src' /usr/bin/clang -DPACKAGE=\"chgrep\" -DVERSION=\"1.2.4\" -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -I. -I. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -c chgrep.c /usr/bin/clang -DPACKAGE=\"chgrep\" -DVERSION=\"1.2.4\" -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -I. -I. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -c error.c /usr/bin/clang -DPACKAGE=\"chgrep\" -DVERSION=\"1.2.4\" -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -I. -I. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -c functions.c /usr/bin/clang -DPACKAGE=\"chgrep\" -DVERSION=\"1.2.4\" -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -I. -I. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -c ftw.c /usr/bin/clang -DPACKAGE=\"chgrep\" -DVERSION=\"1.2.4\" -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_REGCOMP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -I. -I. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -c wrappers.c error.c:126:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security] syslog(level, buf); ^~~ error.c:126:17: note: treat the string as an argument to avoid this syslog(level, buf); ^ "%s", functions.c:87:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\topen error:%s", file, strerror(errno)); ^ chgrep.c:161:4: error: implicit declaration of function 'Write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Write(STDOUT_FILENO, "STDIN\n", 6); ^ functions.c:91:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfstat error:%s", file, strerror(errno)); ^ functions.c:101chgrep.c:180:4:4:: errorerror: : implicit declaration of function 'ftw' is invalid in C99 [-Werror,-Wimplicit-function-declaration] implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ftw(argv[opttmp], list, sysconf(_SC_OPEN_MAX)); ^ err_msg("%s\topen error:%s", tmpfile, strerror(errno)); ^ functions.c:108:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tchmod error:%s", tmpfile, strerror(errno)); ^ functions.c:116:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tchown error:%s", tmpfile, strerror(errno)); ^ functions.c:124:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfcntl error:%s", file, strerror(errno)); ^ functions.c:133:3: error: implicit declaration of function 'Write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Write(STDERR_FILENO, "\n", 1); ^ chgrep.c:212:4: error: implicit declaration of function 'Write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Write(STDOUT_FILENO, argv[opttmp], strlen(argv[opttmp])); ^ functions.c:139:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("Loop %d: Read: %d, Counter: %d", ++loop, nread, counter); ^ functions.c:183:3: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] 3 errors generated. err_msg("%s\tfcntl error:%s", tmpfile, strerror(errno)); ^ functions.c:256:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\topen error:%s", file, strerror(errno)); ^ functions.c:260:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfstat error:%s", file, strerror(errno)); ^ functions.c:270:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\topen error:%s", tmpfile, strerror(errno)); ^ functions.c:277:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tchmod error:%s", tmpfile, strerror(errno)); ^ functions.c:285:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tchown error:%s", tmpfile, strerror(errno)); ^ functions.c:293:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfcntl error:%s", file, strerror(errno)); ^ functions.c:303:3: error: implicit declaration of function 'Write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Write(STDERR_FILENO, "\n", 1); ^ functions.c:309:25: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("Loop %d: Read: %d, Counter: %d", ++loop, nread, counter); ^ functions.c:353:3: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfcntl error:%s", tmpfile, strerror(errno)); ^ functions.c:396:4: error: implicit declaration of function 'err_msg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] err_msg("%s\tfile didn't change! Try -t option!", name); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[1]: *** [chgrep.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [functions.o] Error 1 1 warning generated. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_chgrep/chgrep/work/chgrep-1.2.4/src' make: *** [all-recursive] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_chgrep/chgrep/work/chgrep-1.2.4' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_chgrep/chgrep/work/chgrep-1.2.4" && /usr/bin/make -j16 -w all Exit code: 2 Error: Failed to build chgrep: command execution failed DEBUG: Error code: CHILDSTATUS 83165 2
Change History (1)
comment:1 Changed 4 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 aa2892db71f8ffc637b76eaa5d15598a980edaf1/macports-ports (master):