Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62291 closed defect (fixed)

ssed @3.62: error: implicitly declaring library function 'strcmp'

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc: ryandesign (Ryan Carsten Schmidt)
Port: ssed

Description

Another victim of -Werror=implicit-function-declaration being on by default now:

if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl -I../pcre -I..	-I../lib -I../intl -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -MT getline.o -MD -MP -MF ".deps/getline.Tpo" -c -o getline.o getline.c; \
	then mv -f ".deps/getline.Tpo" ".deps/getline.Po"; else rm -f ".deps/getline.Tpo"; exit 1; fi
if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl -I../pcre -I..	-I../lib -I../intl -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -MT obstack.o -MD -MP -MF ".deps/obstack.Tpo" -c -o obstack.o obstack.c; \
	then mv -f ".deps/obstack.Tpo" ".deps/obstack.Po"; else rm -f ".deps/obstack.Tpo"; exit 1; fi
if /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..  -I../lib -I../intl -I../pcre -I..	-I../lib -I../intl -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -MT strverscmp.o -MD -MP -MF ".deps/strverscmp.Tpo" -c -o strverscmp.o strverscmp.c; \
	then mv -f ".deps/strverscmp.Tpo" ".deps/strverscmp.Po"; else rm -f ".deps/strverscmp.Tpo"; exit 1; fi
getopt.c:576:30: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
      if (optind != argc && !strcmp (argv[optind], "--"))
                             ^
getopt.c:576:30: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
getopt.c:655:21: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
                == (unsigned int) strlen (p->name))
                                  ^
getopt.c:655:21: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
getopt.c:703:6: warning: add explicit braces to avoid dangling else [-Wdangling-else]
                   else
                   ^
1 warning and 2 errors generated.
getline.c:34:1: error: conflicting types for 'getline'
getline (lineptr, n, stream)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:355:9: note: previous declaration is here
ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
        ^
make[2]: *** [getopt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [getline.o] Error 1
utils.c:96:4: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          unlink (open_files->name);
          ^
utils.c:134:8: warning: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'bool' declared in a previous prototype [-Wknr-promoted-parameter]
  bool fail;
       ^
./utils.h:25:61: note: previous declaration is here
FILE *ck_fopen P_((const char *name, const char *mode, bool fail));
                                                            ^
utils.c:332:7: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      unlink (unlink_if_fail);
      ^
1 warning and 2 errors generated.
make[2]: *** [utils.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_ssed/ssed/work/sed-3.62" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build ssed: command execution failed
DEBUG: Error code: CHILDSTATUS 65095 2

Change History (4)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: bigsur catalina added

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign

In febdd3d5d663b63462ee9f7f58ef6353cdaa7604/macports-ports (master):

ssed: Fix implicit declaration of functions

Closes: #62291

Also modernize checksums.

Note: See TracTickets for help on using tickets.