[Git][NTPsec/ntpsec][master] Fix FreeBSD compiler warnings.
Eric S. Raymond
gitlab at mg.gitlab.com
Mon Sep 26 10:56:23 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
1c57f528 by Eric S. Raymond at 2016-09-26T06:55:43-04:00
Fix FreeBSD compiler warnings.
- - - - -
2 changed files:
- tests/libntp/timespecops.c
- tests/libntp/timevalops.c
Changes:
=====================================
tests/libntp/timespecops.c
=====================================
--- a/tests/libntp/timespecops.c
+++ b/tests/libntp/timespecops.c
@@ -32,16 +32,6 @@ struct lfpfracdata {
uint32_t frac;
};
-
-static bool timespec_isValid(struct timespec V);
-static struct timespec timespec_init(time_t hi, long lo);
-static l_fp l_fp_init(int32_t i, uint32_t f);
-static bool AssertFpClose(const l_fp m, const l_fp n,
- const l_fp limit);
-static bool AssertTimespecClose(const struct timespec m,
- const struct timespec n,
- const struct timespec limit);
-
TEST_GROUP(timespecops);
TEST_SETUP(timespecops) {init_lib();}
@@ -109,7 +99,10 @@ static bool AssertTimespecClose(const struct timespec m, const struct timespec n
return true;
else
{
- printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%lunsec\n", m.tv_sec, m.tv_nsec, n.tv_sec, n.tv_nsec, diff.tv_sec, diff.tv_nsec);
+ printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%lunsec\n",
+ (long)m.tv_sec, m.tv_nsec,
+ (long)n.tv_sec, n.tv_nsec,
+ (long)diff.tv_sec, diff.tv_nsec);
return false;
}
}
=====================================
tests/libntp/timevalops.c
=====================================
--- a/tests/libntp/timevalops.c
+++ b/tests/libntp/timevalops.c
@@ -76,7 +76,10 @@ static bool AssertTimevalClose(const struct timeval m, const struct timeval n,
return true;
else
{
- printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%luusec\n", m.tv_sec, m.tv_usec, n.tv_sec, n.tv_usec, diff.tv_sec, diff.tv_usec);
+ printf("m_expr which is %ld.%lu \nand\nn_expr which is %ld.%lu\nare not close; diff=%ld.%luusec\n",
+ (long)m.tv_sec, m.tv_usec,
+ (long)n.tv_sec, n.tv_usec,
+ (long)diff.tv_sec, diff.tv_usec);
//I don't have variables m_expr and n_expr in unity, those are command line arguments which only getst has!!!
return false;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1c57f52829e30e88e33fb3e60cc05935259246f0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160926/2e03129c/attachment.html>
More information about the vc
mailing list