On Thu, 29 Aug 2019, Gary E. Miller via devel wrote:
Warnings on OSX:
[ 73/131] Compiling libntp/ntp_calendar.c
../../ntpd/ntp_control.c:2612:27: warning: format specifies type 'unsigned
short' but the argument has type 'unsigned int' [-Wformat]
socktoa(rmt_addr), (unsigned)SRCPORT(rmt_addr));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[106/131] Compiling ntpd/ntp_dns.c
../../ntpd/refclock_gpsd.c:2118:6: warning: implicit declaration of function
'strlcpy' is invalid in C99 [-Wimplicit-function-declaration]
strlcpy(pp->a_lastcode, tc, sizeof(pp->a_lastcode));
^
../../ntpd/refclock_gpsd.c:2118:6: warning: this function declaration is not a
prototype [-Wstrict-prototypes]
2 warnings generated.
Anyone want to fix them?
The second one, which was present on FreeBSD as well, seems to have been
caused by the definition of _XOPEN_SOURCE in refclock_gpsd.c. And in
spite of what the comment says, this definition does *not* seem to be
needed to get strptime(). So simply removing it gets rid of the warning,
and doesn't break anything AFAICT.
I'm looking at the other one now.
Fred Wright
_______________________________________________
devel mailing list
[email protected]
http://lists.ntpsec.org/mailman/listinfo/devel