[Git][NTPsec/ntpsec][master] Address GitLab issue #217: Warnings on OpenBSD 6.0.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Dec 29 17:26:31 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
eb1b864d by Eric S. Raymond at 2016-12-29T12:23:02-05:00
Address GitLab issue #217: Warnings on OpenBSD 6.0.
Prevent possible format warning is suseconds_t != long on a platform.

- - - - -


1 changed file:

- ntpd/refclock_shm.c


Changes:

=====================================
ntpd/refclock_shm.c
=====================================
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -520,7 +520,7 @@ shm_timer(
 	 */
 	/* a_lastcode is seen as timecode with: ntpq -c cv [associd] */
 	c = snprintf(pp->a_lastcode, sizeof(pp->a_lastcode), "%ld.%09ld",
-		     (long)shm_stat.tvt.tv_sec, shm_stat.tvt.tv_nsec);
+		     (long)shm_stat.tvt.tv_sec, (long)shm_stat.tvt.tv_nsec);
 	pp->lencode = (c < (int)sizeof(pp->a_lastcode)) ? c : 0;
 
 	/* check 1: age control of local time stamp */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/eb1b864d36fa38e12e10807949ec6456ab77d4c4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161229/d1a23c39/attachment.html>


More information about the vc mailing list