[ntpsec-main commit] Fix a few more compiler warnings on 32 bit FreeBSD

Hal Murray murray at ntpsec.org
Sat Nov 14 23:43:57 UTC 2015


Module:    ntpsec-main
Branch:    master
Commit:    1df85f3186fed507b8d7ea78c881cb37837bd2dd
Changeset: http://git.ntpsec.org//commit/?id=1df85f3186fed507b8d7ea78c881cb37837bd2dd

Author:    Hal Murray <hmurray at megapathdsl.net>
Date:      Sat Nov 14 15:43:26 2015 -0800

Fix a few more compiler warnings on 32 bit FreeBSD

---

 ntpd/ntp_io.c     | 2 +-
 ntpfrob/pps-api.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index b9c5f83..cf67574 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -3350,7 +3350,7 @@ fetch_timestamp(
 					nts.l_uf = (unsigned long)(ticks * (unsigned long)(sys_tick * FRAC));
 				}
                                 DPRINTF(4, ("fetch_timestamp: system bintime network time stamp: %ld.%09lu\n",
-                                            btp->sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
+                                            (long)btp->sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
 				break;
 #endif  /* USE_SCM_BINTIME */
 #ifdef USE_SCM_TIMESTAMPNS
diff --git a/ntpfrob/pps-api.c b/ntpfrob/pps-api.c
index 65adc87..877d52f 100644
--- a/ntpfrob/pps-api.c
+++ b/ntpfrob/pps-api.c
@@ -41,8 +41,8 @@ Chew(struct timespec *tsa, struct timespec *tsc, unsigned sa, unsigned sc)
 {
 	struct timespec ts;
 
-	printf("%ld.%09ld ", tsa->tv_sec, tsa->tv_nsec);
-	printf("%ld.%09ld ", tsc->tv_sec, tsc->tv_nsec);
+	printf("%ld.%09ld ", (long)tsa->tv_sec, tsa->tv_nsec);
+	printf("%ld.%09ld ", (long)tsc->tv_sec, tsc->tv_nsec);
 	printf("%u %u ", sa, sc);
 
 	ts = *tsc;



More information about the vc mailing list