+2001-04-22 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * util/hist.c:
+ * ntptrace/ntptrace.c:
+ * ntpq/ntpq.c:
+ * ntpdc/ntpdc.c:
+ * ntpdate/ntptimeset.c:
+ * ntpdate/ntpdate.c:
+ * ntpd/refclock_parse.c:
+ * ntpd/refclock_msfees.c:
+ * ntpd/refclock_jupiter.c:
+ * ntpd/ntp_refclock.c:
+ * ntpd/ntp_io.c:
+ * libparse/clk_wharton.c:
+ * libparse/clk_varitext.c:
+ * libparse/clk_trimtaip.c:
+ * libparse/clk_schmid.c:
+ * libparse/clk_rcc8000.c:
+ * libparse/clk_rawdcf.c:
+ * libparse/clk_meinberg.c:
+ * libparse/clk_hopf6021.c:
+ * libparse/clk_dcf7000.c:
+ * libparse/clk_computime.c:
+ Lint. From: Simon Burge <simonb@wasabisystems.com>
+
2001-04-21 Harlan Stenn <stenn@whimsy.udel.edu>
* ntpd/refclock_nmea.c (nmea_receive): Fixes.
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_computime(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_computime(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_dcf7000(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_hopf6021(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("mbg_input(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
msg_buf = (struct msg_buf *)parseio->parse_pdata;
- parseprintf(DD_PARSE, ("gps_input(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!msg_buf)
return PARSE_INP_SKIP;
{
static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
- parseprintf(DD_PARSE, ("inp_rawdcf(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_rcc8000(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_schmid(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_trimtaip(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
struct varitext *t = (struct varitext *)parseio->parse_pdata;
int rtc;
- parseprintf(DD_PARSE, ("inp_varitext(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
if (!t)
return PARSE_INP_SKIP; /* local data not allocated - sigh! */
{
unsigned int rtc;
- parseprintf(DD_PARSE, ("inp_wharton_400a(0x%x, 0x%x, ...)\n", (int)parseio, (int)ch));
+ parseprintf(DD_PARSE, ("inp_wharton_400a(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
switch (ch)
{
err = io_completion_port_sendto(inter, pkt, len, dest);
if (err != ERROR_SUCCESS)
#else
- cc = sendto(inter->fd, (char *)pkt, len, 0, (struct sockaddr *)dest,
+ cc = sendto(inter->fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
sizeof(struct sockaddr_in));
if (cc == -1)
#endif
while (pp->codeproc != pp->coderecv)
off[n++] = pp->filter[pp->codeproc++ % MAXSTAGE];
if (n > 1)
- qsort((char *)off, n, sizeof(double), refclock_cmpl_fp);
+ qsort((char *)off, (size_t)n, sizeof(double), refclock_cmpl_fp);
/*
* Reject the furthest from the median of the samples until
*/
for (i = 0; i < NSAMPLES; i++)
off[i] = up->filter[i];
- qsort((char *)off, NSAMPLES, sizeof(l_fp), jupiter_cmpl_fp);
+ qsort((char *)off, (size_t)NSAMPLES, sizeof(l_fp), jupiter_cmpl_fp);
/*
* Reject the furthest from the median of NSAMPLES samples until
if (ees->dump_vals) dump_buf(coffs, 0, samples, "Raw data is:");
/* Sort the offsets, trim off the extremes, then choose one. */
- qsort((char *) coffs, (u_int)samples, sizeof(l_fp), offcompare);
+ qsort((char *) coffs, (size_t)samples, sizeof(l_fp), offcompare);
noff = samples;
i = 0;
}
#ifdef TIOCM_DTR
- sl232 = sl232 & ~TIOCM_RTS | TIOCM_DTR; /* turn on DTR, clear RTS for power supply */
+ sl232 = (sl232 & ~TIOCM_RTS) | TIOCM_DTR; /* turn on DTR, clear RTS for power supply */
#else
- sl232 = sl232 & ~CIOCM_RTS | CIOCM_DTR; /* turn on DTR, clear RTS for power supply */
+ sl232 = (sl232 & ~CIOCM_RTS) | CIOCM_DTR; /* turn on DTR, clear RTS for power supply */
#endif
if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
}
#ifdef TIOCM_RTS
- sl232 = sl232 & ~TIOCM_DTR | TIOCM_RTS; /* turn on RTS, clear DTR for power supply */
+ sl232 = (sl232 & ~TIOCM_DTR) | TIOCM_RTS; /* turn on RTS, clear DTR for power supply */
#else
- sl232 = sl232 & ~CIOCM_DTR | CIOCM_RTS; /* turn on RTS, clear DTR for power supply */
+ sl232 = (sl232 & ~CIOCM_DTR) | CIOCM_RTS; /* turn on RTS, clear DTR for power supply */
#endif
if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
DWORD err;
#endif /* SYS_WINNT */
- cc = sendto(fd, (char *)pkt, len, 0, (struct sockaddr *)dest,
+ cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
sizeof(struct sockaddr_in));
#ifndef SYS_WINNT
if (cc == -1) {
}
- cc = sendto(fd, (char *)pkt, len, 0, (struct sockaddr *)dest,
+ cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
sizeof(struct sockaddr_in));
#ifndef SYS_WINNT
if (cc == -1) {
int xdatalen
)
{
- if (send(sockfd, xdata, xdatalen, 0) == -1) {
+ if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
warning("write to %s failed", currenthost, "");
return -1;
}
cmdsort[n++] = xcp->keyword;
#ifdef QSORT_USES_VOID_P
- qsort(cmdsort, n, sizeof(char *), helpsort);
+ qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
#else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
+ qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
#endif
maxlength = 0;
printf("Sending %d octets\n", xdatalen);
- if (send(sockfd, xdata, xdatalen, 0) == -1) {
+ if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
warning("write to %s failed", currenthost, "");
return -1;
}
cmdsort[n++] = xcp->keyword;
#ifdef QSORT_USES_VOID_P
- qsort(cmdsort, (unsigned)n, sizeof(char *), helpsort);
+ qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
#else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
+ qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
#endif
maxlength = 0;
#else
(char *)
#endif
- assoc_cache, (unsigned)numassoc,
+ assoc_cache, (size_t)numassoc,
sizeof(struct association), assoccmp);
}
{
int cc;
- cc = sendto(fd, (char *)pkt, len, 0, (struct sockaddr *)dest,
+ cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
sizeof(struct sockaddr_in));
if (cc == -1) {
#ifndef SYS_WINNT
}
if (n == 0)
return;
- qsort((char *)ovfl, (int)n, sizeof(long), col);
+ qsort((char *)ovfl, (size_t)n, sizeof(long), col);
w = 0;
j = 0;
for (i = 0; i < n; i++) {