Fix compile warnings in new code. Patches for these sent to the
ntp maintainer.
This commit is contained in:
parent
a55614023f
commit
c4e79165b2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: systime.c,v 1.1.1.2 2000/04/22 14:53:00 simonb Exp $ */
|
||||
/* $NetBSD: systime.c,v 1.2 2000/04/22 15:49:31 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* systime -- routines to fiddle a UNIX clock.
|
||||
|
@ -161,8 +161,8 @@ adj_systime(
|
|||
/* casey - we need a posix type thang here */
|
||||
if (adjtime(&adjtv, &oadjtv) < 0)
|
||||
{
|
||||
msyslog(LOG_ERR, "Can't adjust time (%d sec, %d usec): %m",
|
||||
adjtv.tv_sec, adjtv.tv_usec);
|
||||
msyslog(LOG_ERR, "Can't adjust time (%ld sec, %ld usec): %m",
|
||||
(long)adjtv.tv_sec, (long)adjtv.tv_usec);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntp_config.c,v 1.1.1.2 2000/04/22 14:53:14 simonb Exp $ */
|
||||
/* $NetBSD: ntp_config.c,v 1.2 2000/04/22 15:49:32 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* ntp_config.c - read and apply configuration information
|
||||
|
@ -710,7 +710,7 @@ getconfig(
|
|||
int ttl;
|
||||
keyid_t peerkey;
|
||||
char *peerkeystr;
|
||||
keyid_t lpeerkey;
|
||||
u_long lpeerkey;
|
||||
int peerflags;
|
||||
int hmode;
|
||||
struct sockaddr_in peeraddr;
|
||||
|
@ -1464,7 +1464,7 @@ getconfig(
|
|||
|
||||
case CONFIG_REQUESTKEY:
|
||||
if (ntokens >= 2) {
|
||||
keyid_t rkey;
|
||||
u_long rkey;
|
||||
|
||||
if (!atouint(tokens[1], &rkey)) {
|
||||
msyslog(LOG_ERR,
|
||||
|
@ -1478,7 +1478,7 @@ getconfig(
|
|||
#ifdef DEBUG
|
||||
if (debug > 3)
|
||||
printf(
|
||||
"set info_auth_key to %08x\n", rkey);
|
||||
"set info_auth_key to %08lx\n", rkey);
|
||||
#endif
|
||||
info_auth_keyid = rkey;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntp_intres.c,v 1.1.1.2 2000/04/22 14:53:16 simonb Exp $ */
|
||||
/* $NetBSD: ntp_intres.c,v 1.2 2000/04/22 15:49:32 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* ripped off from ../ntpres/ntpres.c by Greg Troxel 4/2/92
|
||||
|
@ -448,6 +448,7 @@ findhostaddr(
|
|||
)
|
||||
{
|
||||
struct hostent *hp;
|
||||
struct in_addr in;
|
||||
|
||||
checkparent(); /* make sure our guy is still running */
|
||||
|
||||
|
@ -475,7 +476,8 @@ findhostaddr(
|
|||
msyslog(LOG_INFO, "findhostaddr: Resolving %x>",
|
||||
entry->ce_peeraddr);
|
||||
#endif
|
||||
hp = gethostbyaddr((const char *)entry->ce_peeraddr,
|
||||
in.s_addr = entry->ce_peeraddr;
|
||||
hp = gethostbyaddr((const char *)&in,
|
||||
sizeof entry->ce_peeraddr,
|
||||
AF_INET);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntp_request.c,v 1.1.1.2 2000/04/22 14:53:20 simonb Exp $ */
|
||||
/* $NetBSD: ntp_request.c,v 1.2 2000/04/22 15:49:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* ntp_request.c - respond to information requests
|
||||
|
@ -11,6 +11,8 @@
|
|||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "ntpd.h"
|
||||
#include "ntp_io.h"
|
||||
|
@ -537,10 +539,10 @@ process_private(
|
|||
if (proc->sizeofitem != 0)
|
||||
if (proc->sizeofitem*INFO_NITEMS(inpkt->err_nitems)
|
||||
> sizeof(inpkt->data)) {
|
||||
msyslog(LOG_ERR, "sizeofitem(%d)*NITEMS(%d) > data: %d > %d",
|
||||
msyslog(LOG_ERR, "sizeofitem(%d)*NITEMS(%d) > data: %d > %ld",
|
||||
proc->sizeofitem, INFO_NITEMS(inpkt->err_nitems),
|
||||
proc->sizeofitem*INFO_NITEMS(inpkt->err_nitems),
|
||||
sizeof(inpkt->data));
|
||||
(long)sizeof(inpkt->data));
|
||||
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
|
||||
return;
|
||||
}
|
||||
|
@ -1234,7 +1236,6 @@ dns_a(
|
|||
register struct info_dns_assoc *dp;
|
||||
register int items;
|
||||
struct sockaddr_in peeraddr;
|
||||
int fl;
|
||||
|
||||
/*
|
||||
* Do a check of everything to see that it looks
|
||||
|
@ -1273,7 +1274,6 @@ dns_a(
|
|||
while (items-- > 0) {
|
||||
u_short associd;
|
||||
size_t hnl;
|
||||
char *cp;
|
||||
struct peer *peer;
|
||||
int bogon = 0;
|
||||
|
||||
|
@ -1289,8 +1289,8 @@ dns_a(
|
|||
peeraddr.sin_addr.s_addr = dp->peeraddr;
|
||||
for (hnl = 0; dp->hostname[hnl] && hnl < sizeof dp->hostname; ++hnl) ;
|
||||
if (hnl >= sizeof dp->hostname) {
|
||||
msyslog(LOG_ERR, "dns_a: hnl (%d) >= %d",
|
||||
hnl, sizeof dp->hostname);
|
||||
msyslog(LOG_ERR, "dns_a: hnl (%ld) >= %ld",
|
||||
(long)hnl, (long)sizeof dp->hostname);
|
||||
++bogon;
|
||||
}
|
||||
|
||||
|
@ -1433,7 +1433,7 @@ setclr_flags(
|
|||
if (flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_AUTHENTICATE |
|
||||
SYS_FLAG_NTP | SYS_FLAG_KERNEL | SYS_FLAG_MONITOR |
|
||||
SYS_FLAG_FILEGEN)) {
|
||||
msyslog(LOG_ERR, "setclr_flags: extra flags: %#x",
|
||||
msyslog(LOG_ERR, "setclr_flags: extra flags: %#lx",
|
||||
flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_AUTHENTICATE |
|
||||
SYS_FLAG_NTP | SYS_FLAG_KERNEL |
|
||||
SYS_FLAG_MONITOR | SYS_FLAG_FILEGEN));
|
||||
|
@ -1740,7 +1740,7 @@ reset_stats(
|
|||
flags = ((struct reset_flags *)inpkt->data)->flags;
|
||||
|
||||
if (flags & ~RESET_ALLFLAGS) {
|
||||
msyslog(LOG_ERR, "reset_stats: reset leaves %#x",
|
||||
msyslog(LOG_ERR, "reset_stats: reset leaves %#lx",
|
||||
flags & ~RESET_ALLFLAGS);
|
||||
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntp_util.c,v 1.1.1.2 2000/04/22 14:53:22 simonb Exp $ */
|
||||
/* $NetBSD: ntp_util.c,v 1.2 2000/04/22 15:49:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* ntp_util.c - stuff I didn't have any other place for
|
||||
|
@ -355,7 +355,7 @@ stats_config(
|
|||
(void) fclose(fp);
|
||||
if ( !finite(old_drift)
|
||||
|| (fabs(old_drift) > (sys_maxfreq * 1e6))) {
|
||||
msyslog(LOG_ERR, "invalid frequency (%lf) in %s",
|
||||
msyslog(LOG_ERR, "invalid frequency (%f) in %s",
|
||||
old_drift, stats_drift_file);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: refclock_oncore.c,v 1.1.1.1 2000/03/29 12:38:53 simonb Exp $ */
|
||||
/* $NetBSD: refclock_oncore.c,v 1.2 2000/04/22 15:49:33 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
|
@ -1589,7 +1589,8 @@ oncore_msg_En(
|
|||
|
||||
if (debug > 2)
|
||||
printf("ONCORE: serial/j (%lu, %d) %ld.%09ld\n",
|
||||
pps_i.assert_sequence, j, tsp->tv_sec, tsp->tv_nsec);
|
||||
(long)pps_i.assert_sequence, j,
|
||||
(long)tsp->tv_sec, (long)tsp->tv_nsec);
|
||||
|
||||
if (pps_i.assert_sequence == j) {
|
||||
printf("ONCORE: oncore_msg_En, error serial pps\n");
|
||||
|
@ -1601,7 +1602,8 @@ oncore_msg_En(
|
|||
|
||||
if (debug > 2)
|
||||
printf("ONCORE: serial/j (%lu, %d) %ld.%09ld\n",
|
||||
pps_i.clear_sequence, j, tsp->tv_sec, tsp->tv_nsec);
|
||||
(long)pps_i.clear_sequence, j,
|
||||
(long)tsp->tv_sec, (long)tsp->tv_nsec);
|
||||
|
||||
if (pps_i.clear_sequence == j) {
|
||||
printf("ONCORE: oncore_msg_En, error serial pps\n");
|
||||
|
|
Loading…
Reference in New Issue