[Git][NTPsec/ntpsec][master] 2 commits: Add a noreturn suggested by clang.

Gary E. Miller gitlab at mg.gitlab.com
Thu Mar 9 23:25:07 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
7c865a62 by Gary E. Miller at 2017-03-08T17:09:00-08:00
Add a noreturn suggested by clang.

- - - - -
790ed291 by Gary E. Miller at 2017-03-09T15:22:19-08:00
Comment on l_fp, plus POSIX and NTP epochs.

- - - - -


2 changed files:

- include/ntp_fp.h
- libisc/include/isc/error.h


Changes:

=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -28,6 +28,14 @@
  *   |			       Fractional Part			     |
  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *
+ * All the seconds we need fit in 31 bits.  At least until 2038.
+ * 7FFFFFFFu is 2147483647 which is "Mon Jan 18 19:14:07 PST 2038".
+ *
+ * With the caveat they must be POSIX seconds.  NTP seconds are
+ * based on 12/1/1 BC.  Thus they overflowed 32 bits of seconds a
+ * long time ago.  All the places that stuff NTP epoch time in l_fp
+ * are overflowing.
+ *
  */
 typedef uint64_t l_fp;
 #define lfpfrac(n)		((uint32_t)(n))


=====================================
libisc/include/isc/error.h
=====================================
--- a/libisc/include/isc/error.h
+++ b/libisc/include/isc/error.h
@@ -39,7 +39,8 @@ ISC_FORMAT_PRINTF(3, 4) ISC_PLATFORM_NORETURN_POST;
 
 /*% runtimecheck error */
 void
-isc_error_runtimecheck(const char *, int, const char *);
+isc_error_runtimecheck(const char *, int, const char *)
+			__attribute__	((__noreturn__));
 
 #define ISC_ERROR_RUNTIMECHECK(cond) \
 	((void) ((cond) || \



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/aec2eee1cde1611879376792f9582a77df3928ec...790ed291833e993bf9165b8c50c4f5af6d4595ad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170309/c3b8cb6e/attachment.html>


More information about the vc mailing list