+---
+* [Bug 3065] Quiet warnings on NetBSD <perlinger@ntp.org>
+ - applied some of the patches provided by Harvard. Not all of them
+ still match the current code base, and I did not touch libopt.
+
---
(4.2.8p9) 2016/11/21 Released by Harlan Stenn <stenn@ntp.org>
-(4.2.8p9) 2016/MM/DD Released by Harlan Stenn <stenn@ntp.org>
* [Sec 3119] Trap crash <perlinger@ntp.org>
* [Sec 3118] Mode 6 information disclosure and DDoS vector <perlinger@ntp.org>
extern char * fptoa (s_fp, short);
extern char * fptoms (s_fp, short);
extern int hextolfp (const char *, l_fp *);
-extern void gpstolfp (int, int, unsigned long, l_fp *);
+extern void gpstolfp (u_int, u_int, unsigned long, l_fp *);
extern int mstolfp (const char *, l_fp *);
extern char * prettydate (l_fp *);
extern char * gmprettydate (l_fp *);
{
case CMD_RCURTIME:
{ /* GPS time */
- l_fp secs;
- int week = getshort((unsigned char *)&mb(4));
- l_fp utcoffset;
- l_fp gpstime;
+ l_fp secs;
+ u_int week = getshort((unsigned char *)&mb(4));
+ l_fp utcoffset;
+ l_fp gpstime;
bp = &mb(0);
if (fetch_ieee754(&bp, IEEE_SINGLE, &secs, trim_offsets) != IEEE_OK)
void
gpstolfp(
- int weeks,
- int days,
+ u_int weeks,
+ u_int days,
unsigned long seconds,
l_fp * lfp
)
l_fp tRecvTimestamp; /* arrival timestamp */
int rc ;
char *pBuf, sLogText [ MAX_LOGTEXT ] ;
- int iLen, iCopyLen ;
+ size_t iLen, iCopyLen ;
int i, j, iReadRawBuf, iBreakPosition ;
/*
{
char sLog [ 80 ], sFirstThreeDigits [ 4 ] ;
- int i, iNumberOfDigitsOfPhoneNumber, iCommaCount, iCommaPosition ;
- int iFirstThreeDigitsCount ;
+ int iNumberOfDigitsOfPhoneNumber, iCommaCount, iCommaPosition ;
+ size_t i ;
+ size_t iFirstThreeDigitsCount ;
jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Telephone JJY" ) ;
struct jjyunit *up;
struct refclockproc *pp;
char *pBuf ;
- int iLen ;
+ size_t iLen ;
#ifdef DEBUG
static const char *sFunctionName = "modem_receive" ;
#ifdef DEBUG
if ( debug ) {
char sResp [ 40 ] ;
- int iCopyLen ;
+ size_t iCopyLen ;
iCopyLen = ( iLen <= sizeof(sResp)-1 ? iLen : sizeof(sResp)-1 ) ;
strncpy( sResp, pBuf, iLen <= sizeof(sResp)-1 ? iLen : sizeof(sResp)-1 ) ;
sResp[iCopyLen] = 0 ;
- printf ( "refclock_jjy.c : modem_receive : iLen=%d pBuf=[%s] iModemEvent=%d\n", iCopyLen, sResp, up->iModemEvent ) ;
+ printf ( "refclock_jjy.c : modem_receive : iLen=%zu pBuf=[%s] iModemEvent=%d\n", iCopyLen, sResp, up->iModemEvent ) ;
}
#endif
modem_control ( peer, pp, up ) ;
static void
mk_utcinfo(
- char *t, // pointer to the output string buffer
- int wnt,
- int wnlsf,
+ char *t, /* pointer to the output string buffer */
+ uint16_t wnt,
+ uint16_t wnlsf,
int dn,
int dtls,
int dtlsf,
- int size // size of the output string buffer
+ int size /* size of the output string buffer */
)
{
/*
+ GPS_SEC_BIAS - 1;
tm = gmtime( &t_ls );
- if (tm == NULL) // gmtime() failed
+ if (tm == NULL) /* gmtime() failed */
{
snprintf( t, size, "** (gmtime() failed in mk_utcinfo())" );
return;
/*
* For commands typed on the command line (with the -c option)
*/
-int numcmds = 0;
+size_t numcmds = 0;
const char *ccmds[MAXCMDS];
#define ADDCMD(cp) if (numcmds < MAXCMDS) ccmds[numcmds++] = (cp)
)
{
u_int ihost;
- int icmd;
+ size_t icmd;
#ifdef SYS_VXWORKS
/* Lowercase names aren't accepted by keytype_from_text in ssl_init.c */
for( cp = name; *cp; cp++ ) {
- if( islower(*cp) )
+ if( islower((unsigned int)*cp) )
return;
}
len = (cp - name) + 1;