[Git][NTPsec/ntpsec][master] attic/timestamp-info: Fix a few warnings on recent Fedora.

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Sat Feb 8 10:08:02 UTC 2025



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
138f6b33 by Fred Wright at 2025-02-07T23:31:37-08:00
attic/timestamp-info: Fix a few warnings on recent Fedora.

- - - - -


1 changed file:

- attic/timestamp-info.c


Changes:

=====================================
attic/timestamp-info.c
=====================================
@@ -153,7 +153,7 @@ get_osver(void)
 
   if (sysctl(mib, miblen, osver, &len, NULL, 0)) return -1;
 #endif /* !__linux__ */
-  if (len <= 0 || len >= sizeof(osver)) return -1;
+  if (len <= 0 || len >= (ssize_t) sizeof(osver)) return -1;
   osver[len] = '\0';
   if (osver[len - 1] == '\n') osver[len - 1] = '\0';
   return 0;
@@ -330,7 +330,7 @@ test_timestamp(const char *name, ts_type_t tstype,
   datalen = cmsglen - hdrlen;
   datap = (uint32_t *) (cbuf + hdrlen);
   printf("    cmsg length = %d (%d+%d), level = %d, type = %d\n",
-         cmsglen, hdrlen, datalen, cmsglvl, cmsgtype);
+         (int) cmsglen, hdrlen, datalen, cmsglvl, cmsgtype);
   if (hdrlen > (int) sizeof(*cmsg)) {
     xdatap = (uint32_t *) (cbuf + sizeof(*cmsg));
     printf("    header padding:\n");
@@ -343,7 +343,8 @@ test_timestamp(const char *name, ts_type_t tstype,
     printf("      %010u\n", *datap++);
   }
   if (cbuflen > cmsglen) {
-    printf("    +%d bytes of additional cmsg data\n", cbuflen - cmsglen);
+    printf("    +%d bytes of additional cmsg data\n",
+           (int) (cbuflen - cmsglen));
   }
 }
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/138f6b33c30a11f50d7dae8859e2669c37e200b9

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/138f6b33c30a11f50d7dae8859e2669c37e200b9
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/20250208/6e6b418f/attachment-0001.htm>


More information about the vc mailing list