Yo Greg! On Thu, 20 Nov 2025 08:24:36 -0500 Greg Troxel <[email protected]> wrote:
> "Gary E. Miller" <[email protected]> writes: > > > Yes. We often use casts to avoid compiler warnings, and is not > > obvious what the best cast is for 32-bit and 64-bit compatibilty, > > As proven in this thead by you and Greg reaching for (long) when > > you need (long long). size_t and ssize_t almost always cause > > warnings in new code. > > As I said, the right answer for types that you have no idea what they > are -- if you don't use the PRI macro that the type should have > defined -- is intmax_t and %j. Hal and I already stated why PKI does not work for gpsd. intmax_t just increases the number of compiler warnings about overflow and wraparound, which leads to more casts, which leads to more hidden overflow and wraparound. The C library functions us int, long, size_t, etc. best to use the soze needed to use those wothout casts. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 [email protected] Tel:+1 541 382 8588 Veritas liberabit vos. -- Quid est veritas? "If you can't measure it, you can't improve it." - Lord Kelvin
pgpSIVlgsZxyi.pgp
Description: OpenPGP digital signature
