Opened 4 years ago

Closed 4 years ago

#62284 closed defect (fixed)

uni2ascii @4.18_1: 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.6.4
Keywords: Cc:
Port: uni2ascii

Description

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

--->  Building uni2ascii
DEBUG: Executing org.macports.build (uni2ascii)
ndian.Tpo -c -o endian.o endian.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT enttbl.o -MD -MP -MF .deps/enttbl.Tpo -c -o enttbl.o enttbl.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT SetFormat.o -MD -MP -MF .deps/SetFormat.Tpo -c -o SetFormat.o SetFormat.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT uni2ascii.o -MD -MP -MF .deps/uni2ascii.Tpo -c -o uni2ascii.o uni2ascii.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT UTF8in.o -MD -MP -MF .deps/UTF8in.Tpo -c -o UTF8in.o UTF8in.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT putu8.o -MD -MP -MF .deps/putu8.Tpo -c -o putu8.o putu8.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT ascii2uni.o -MD -MP -MF .deps/ascii2uni.Tpo -c -o ascii2uni.o ascii2uni.c
/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DNEWSUMMARY  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -g -MT GetWord.o -MD -MP -MF .deps/GetWord.Tpo -c -o GetWord.o GetWord.c
cp u2a.tcl u2a
mv -f .deps/endian.Tpo .deps/endian.Po
enttbl.c:560:8: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
    c =strcmp(s,EntityCodeTable[m].name);
       ^
enttbl.c:560:8: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
1 error generated.
make[1]: *** [enttbl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/putu8.Tpo .deps/putu8.Po
mv -f .deps/GetWord.Tpo .deps/GetWord.Po
uni2ascii.c:2682:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
SubstituteChar(UTF32 c) {
^
uni2ascii.c:2696:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
AddCustomSubstitution(char *str){
^
uni2ascii.c:2733:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
uni2ascii.c:3176:24: error: implicit declaration of function 'putu8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      if(PassThroughP) putu8(c);
                       ^
3 warnings and 1 error generated.
make[1]: *** [uni2ascii.o] Error 1
mv -f .deps/UTF8in.Tpo .deps/UTF8in.Po
mv -f .deps/SetFormat.Tpo .deps/SetFormat.Po
mv -f .deps/ascii2uni.Tpo .deps/ascii2uni.Po
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_uni2ascii/uni2ascii/work/uni2ascii-4.18'
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_uni2ascii/uni2ascii/work/uni2ascii-4.18'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_uni2ascii/uni2ascii/work/uni2ascii-4.18" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build uni2ascii: command execution failed
DEBUG: Error code: CHILDSTATUS 53278 2

Change History (1)

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 15325e5b53c60a19f6733855b0d6dd11f7b898e8/macports-ports (master):

uni2ascii: Fix implicit declaration of functions

Closes: #62284

Also modernize checksums, fix livecheck, and add modeline.

Note: See TracTickets for help on using tickets.