[Git][NTPsec/ntpsec][master] Fix format %ld warnings when time_t is 32 bits.

Hal Murray gitlab at mg.gitlab.com
Fri Nov 24 11:33:40 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
930f7596 by Hal Murray at 2017-11-24T03:32:31-08:00
Fix format %ld warnings when time_t is 32 bits.

- - - - -


1 changed file:

- libntp/systime.c


Changes:

=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -184,14 +184,13 @@ normalize_time(
 		if (!L_ISGTU(result, lfp_prev) &&
 		    sys_fuzz > 0.) {
 			msyslog(LOG_ERR, "CLOCK: ts_prev %ld s + %ld ns, ts_min %ld s + %ld ns",
-				ts_prev_log.tv_sec, ts_prev.tv_nsec,
-				ts_min.tv_sec, ts_min.tv_nsec);
+				(long)ts_prev_log.tv_sec, ts_prev.tv_nsec,
+				(long)ts_min.tv_sec, ts_min.tv_nsec);
 			msyslog(LOG_ERR, "CLOCK: ts %ld s + %ld ns",
-				ts.tv_sec, ts.tv_nsec);
+				(long)ts.tv_sec, ts.tv_nsec);
 			msyslog(LOG_ERR, "CLOCK: sys_fuzz %ld nsec, prior fuzz %.9f",
 				sys_fuzz_nsec, dfuzz_prev);
-			msyslog(LOG_ERR, "CLOCK: this fuzz %.9f",
-				dfuzz);
+			msyslog(LOG_ERR, "CLOCK: this fuzz %.9f", dfuzz);
 			lfpdelta = lfp_prev;
 			lfpdelta -= result;
 			ddelta = lfptod(lfpdelta);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/930f7596b427573d91b6eb47895bd30a5f5c0ed6

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/930f7596b427573d91b6eb47895bd30a5f5c0ed6
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171124/02871699/attachment.html>


More information about the vc mailing list