[Git][NTPsec/ntpsec][master] 2 commits: include/ntp_fp.h: Fix an odd cast of a cast that confuses clang 13.
Gary E. Miller (@garyedmundsmiller)
gitlab at mg.gitlab.com
Tue May 17 00:34:00 UTC 2022
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
9c18e528 by Gary E. Miller at 2022-05-16T17:23:33-07:00
include/ntp_fp.h: Fix an odd cast of a cast that confuses clang 13.
- - - - -
a8ab5896 by Gary E. Miller at 2022-05-16T17:33:36-07:00
tests/libntp/lfpfunc.c: Compare as the utin64_t that they are.
- - - - -
2 changed files:
- include/ntp_fp.h
- tests/libntp/lfpfunc.c
Changes:
=====================================
include/ntp_fp.h
=====================================
@@ -106,8 +106,9 @@ typedef struct {
* Operations on the long fp format. The only reason these aren't
* native operations is to be independent of whether the l_fp
* type is signed or unsigned.
+ * Can l_fp ever be signed??
*/
-#define L_NEG(v) (v) = (l_fp)(-(int64_t)(v))
+#define L_NEG(v) (v) = -(v)
#define L_ISNEG(v) M_ISNEG(lfpuint(v))
#define L_ISGT(a, b) ((int64_t)(a) > (int64_t)(b))
#define L_ISGTU(a, b) ((a) > (b))
=====================================
tests/libntp/lfpfunc.c
=====================================
@@ -230,7 +230,7 @@ TEST(lfpfunc, Absolute) {
TEST_ASSERT_EQUAL(-1, l_fp_signum(minVal));
l_fp minAbs = l_fp_abs(minVal);
- TEST_ASSERT_EQUAL(minVal, minAbs);
+ TEST_ASSERT_EQUAL_UINT64(minVal, minAbs);
return;
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/26d21969da41a33fd496819701384e41f7340c81...a8ab5896f404a02d7f4fbd199cd2534e0a99a1c0
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/26d21969da41a33fd496819701384e41f7340c81...a8ab5896f404a02d7f4fbd199cd2534e0a99a1c0
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20220517/3d160c04/attachment-0001.htm>
More information about the vc
mailing list