Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63223 closed defect (fixed)

libpcapnav @0.8: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)'

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

Description

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

/usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I../src  -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I/opt/local/include/pcap  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -MT pcapnav-filespan.o -MD -MP -MF .deps/pcapnav-filespan.Tpo -c -o pcapnav-filespan.o pcapnav-filespan.c
pcapnav-jump.c:24:9: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
  if (! strcmp(argv[2], "leq"))
        ^
pcapnav-jump.c:24:9: note: pcapnav-offsets.c:40:19: include the header <string.h> or explicitly provide a declaration for 'strcmp'
warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]
         hdr->ts.tv_sec, hdr->ts.tv_usec,
                         ^~~~~~~~~~~~~~~
pcapnav-filespan.c:24:3: warning: format specifies type 'unsigned int' but the argument has type '__darwin_time_t' (aka 'long') [-Wformat]
         start.tv_sec, start.tv_usec,
         ^~~~~~~~~~~~
1 error generated.
pcapnav-filespan.c:25:3: warning: format specifies type 'unsigned int' but the argument has type '__darwin_time_t' (aka 'long') [-Wformat]
         end.tv_sec, end.tv_usec,
         ^~~~~~~~~~
pcapnav-test1.c:27:3: warning: format specifies type 'unsigned int' but the argument has type 'long' [-Wformat]pcapnav-filespan.c
:26:3: warning: format specifies type 'unsigned int' but the argument has type '__darwin_time_t' (aka 'long') [-Wformat]
         delta.tv_sec, delta.tv_usec);
         ^~~~~~~~~~~~
         end.tv_sec-start.tv_sec,
         ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [pcapnav-jump.o] Error 1
make[2]: *** Waiting for unfinished jobs....
3 warnings generated.
1 warning generated.
mv -f .deps/pcapnav-filespan.Tpo .deps/pcapnav-filespan.Po
1 warning generated.
mv -f .deps/pcapnav-offsets.Tpo .deps/pcapnav-offsets.Po
mv -f .deps/pcapnav-concat.Tpo .deps/pcapnav-concat.Po
mv -f .deps/pcapnav-test1.Tpo .deps/pcapnav-test1.Po
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libpcapnav/libpcapnav/work/libpcapnav-0.8/test'
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_net_libpcapnav/libpcapnav/work/libpcapnav-0.8'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libpcapnav/libpcapnav/work/libpcapnav-0.8'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libpcapnav/libpcapnav/work/libpcapnav-0.8" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build libpcapnav: command execution failed
DEBUG: Error code: CHILDSTATUS 24701 2

Change History (2)

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 80a1cd6049f921ec48b4f7a082fd818e61add956/macports-ports (master):

libpcapnav: Fix implicit declaration of function

Closes: #63223

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

Since this software is from 2007 and the web site looks ancient I assume there's no point reporting this to the developer.

Note: See TracTickets for help on using tickets.