dateutils
dateutils copied to clipboard
Implicit-declaration (missing #include) warnings
Building dateutils-0.4.6 on OS X 10.13...
yuck.c:1175:6: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
if (_NSGetExecutablePath(buf, &z) != 0) {
^
time-core.c:124:13: warning: implicitly declaring library function 'strcasecmp' with type 'int (const char *, const char *)' [-Wimplicit-function-declaration]
} else if (strcasecmp(*fmt, "hms") == 0) {
^
time-core.c:124:13: note: include the header <strings.h> or explicitly provide a declaration for 'strcasecmp'
clitosis.c:382:7: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
if (_NSGetExecutablePath(buf, &bsz) < 0) {
^
Hey Daniel, thanks for reporting this. I pushed a fix (00c8383db) to master.
Looks like this can be closed now.
Building 0.4.10 , time-core.c looks clean in this regard. But clitosis.c is still:
clitosis.c:383:7: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
if (_NSGetExecutablePath(buf, &bsz) < 0) {
^
Needs the same fix that yuck.c got in a10d39c1a6114cbd152e04f072ce580918fa90a4:
#if defined __APPLE__
# include <mach-o/dyld.h>
#endif /* __APPLE__ */