[Git][NTPsec/ntpsec][master] Fix error: initializer element is not constant.
Amar Takhar
gitlab at mg.gitlab.com
Fri Dec 4 20:37:47 UTC 2015
Amar Takhar pushed to branch master at NTPsec / ntpsec
Commits:
74355423 by Amar Takhar at 2015-12-04T15:37:15Z
Fix error: initializer element is not constant.
- - - - -
1 changed file:
- tests/libntp/lfptostr.c
Changes:
=====================================
tests/libntp/lfptostr.c
=====================================
--- a/tests/libntp/lfptostr.c
+++ b/tests/libntp/lfptostr.c
@@ -24,12 +24,13 @@ static const int LFP_MAX_PRECISION_MS = 7;
static const int ONE_FOURTH = 1073741824; // (1 << 30)
static const int HALF = (1 << 31);
-static const int THREE_FOURTH = -ONE_FOURTH;
+static const int THREE_FOURTH = -1073741824;
static const int HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
static const int HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
TEST(lfptostr, PositiveInteger) {
+ printf("beeeeeeeeeeer: %d\n", THREE_FOURTH);
l_fp test = {{200}, 0}; // exact 200.0000000000
TEST_ASSERT_EQUAL_STRING("200.0000000000", mfptoa(test.l_ui, test.l_uf, LFP_MAX_PRECISION));
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/74355423ce019d15797a6560c1d308709c3f60f3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151204/c0598b15/attachment.html>
More information about the vc
mailing list