[Git][NTPsec/ntpsec][master] More -Werror fixes
Hal Murray (@hal.murray)
gitlab at mg.gitlab.com
Tue Feb 11 22:05:26 UTC 2025
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
e9645118 by Hal Murray at 2025-02-11T14:04:42-08:00
More -Werror fixes
- - - - -
2 changed files:
- ntpd/refclock_generic.c
- ntpfrob/dump.c
Changes:
=====================================
ntpd/refclock_generic.c
=====================================
@@ -5043,7 +5043,9 @@ trimbletsip_message(
switch (mb(0) & 0xFF)
{
default:
- t = ap(pbuffer, sizeof(pbuffer), t, "illegal value 0x%02x", mb(0) & 0xFF);
+ t = ap(pbuffer, sizeof(pbuffer), \
+ t, "illegal value 0x%02x", \
+ (unsigned)mb(0) & 0xFF);
break;
case 0x00:
t = ap(pbuffer, sizeof(pbuffer), t, "doing position fixes");
@@ -5106,7 +5108,8 @@ trimbletsip_message(
int i, bits;
- t = ap(pbuffer, sizeof(pbuffer), t, "machine id 0x%02x", mb(0) & 0xFF);
+ t = ap(pbuffer, sizeof(pbuffer), t, \
+ "machine id 0x%02x", (unsigned)mb(0) & 0xFF);
bits = mb(1) & 0xFF;
for (i = 0; i < 8; i++) {
=====================================
ntpfrob/dump.c
=====================================
@@ -101,8 +101,9 @@ do_dump(const iomode mode, const int force)
/* FIXME: this should probably check for STA_NANO when printing tv_usec */
if (mode == json) {
- printf("{\"time\":%ld.%09ld, \"verbose\": \"%s\"", txc.time.tv_sec,
- txc.time.tv_usec, verbose[v]);
+ printf("{\"time\":%lld.%09lld, \"verbose\": \"%s\"", \
+ (long long)txc.time.tv_sec,
+ (long long)txc.time.tv_usec, verbose[v]);
for (int i = 0; i < end; i++) {
printf(", \"%s\": %ld", adjkey[i], adjval[i]);
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e9645118362e2e0c3d39bd860c8e32b9009dad51
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/e9645118362e2e0c3d39bd860c8e32b9009dad51
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/20250211/b1ee5b8d/attachment-0001.htm>
More information about the vc
mailing list