[Git][NTPsec/ntpsec][master] Prevent a compiler warning.
Eric S. Raymond
gitlab at mg.gitlab.com
Mon Dec 12 18:44:08 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
211a5f3d by Eric S. Raymond at 2016-12-12T13:43:58-05:00
Prevent a compiler warning.
- - - - -
1 changed file:
- tests/libntp/vi64ops.c
Changes:
=====================================
tests/libntp/vi64ops.c
=====================================
--- a/tests/libntp/vi64ops.c
+++ b/tests/libntp/vi64ops.c
@@ -16,6 +16,7 @@ TEST_TEAR_DOWN(vi64ops) {}
TEST(vi64ops, HiLoVUI64uh) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64hiu(exp, 0x01234567);
setvint64lo(exp, 0x89ABCDEF);
TEST_ASSERT_EQUAL(vint64hiu(exp), 0x01234567);
@@ -24,6 +25,7 @@ TEST(vi64ops, HiLoVUI64uh) {
TEST(vi64ops, HiLoVUI64ul) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64hiu(exp, 0x01234567);
setvint64lo(exp, 0x89ABCDEF);
TEST_ASSERT_EQUAL(vint64lo(exp), 0x89ABCDEF);
@@ -32,6 +34,7 @@ TEST(vi64ops, HiLoVUI64ul) {
TEST(vi64ops, SetVUI64s_pos) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64s(exp, 0x0123456789ABCDEF);
TEST_ASSERT_EQUAL(vint64s(exp), 81985529216486895);
}
@@ -39,6 +42,7 @@ TEST(vi64ops, SetVUI64s_pos) {
TEST(vi64ops, SetVUI64s_neg) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64s(exp, 0xFEDCBA9876543210);
TEST_ASSERT_EQUAL(vint64s(exp), -81985529216486896);
}
@@ -46,6 +50,7 @@ TEST(vi64ops, SetVUI64s_neg) {
TEST(vi64ops, SetVUI64u) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64u(exp, 0xFEDCBA9876543210); /* sign bit is on */
TEST_ASSERT_EQUAL(vint64s(exp), 18364758544493064720UL);
}
@@ -53,6 +58,7 @@ TEST(vi64ops, SetVUI64u) {
TEST(vi64ops, NegVUI64) {
vint64 exp;
+ setvint64u(exp, 0); /* prevent compiler warning */
setvint64s(exp, 71985529216486896);
TEST_ASSERT_EQUAL(negvint64(exp), -71985529216486896);
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/211a5f3de83689d282e80cc36165f2ea666ce1b1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161212/dd70ee3a/attachment.html>
More information about the vc
mailing list