In commit a440745838e3252f0e646f2e154badf58e344ed4
Bernd changed:
- unsigned long i; // unsigned long just in case ints are 32-bit
+ uint64_t i; // uint64_t just in case ints are 32-bit
This creates warning on 32-bit machines:
monitor_italk.c: In function 'display_itk_navfix':
monitor_italk.c:167:29: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
167 | (void)snprintf(prn, 4, "%lu ", i + 1);
| ~~^ ~~~~~
| | |
| | uint64_t {aka long long unsigned int}
| long unsigned int
| %llu
If I change the format to %llu , the build on 32-bit works, but then, on a 64-bit:
monitor_italk.c:167:30: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' {aka 'long unsigned int'} [-Wformat=]
167 | (void)snprintf(prn, 4, "%llu ", i + 1);
| ~~~^ ~~~~~
| | |
| | uint64_t {aka long unsigned int}
| long long unsigned int
| %lu
I think the issue is that we are mixing up two ways, the "long unsigned", and the specific types.
BTW, is anyone else running on 32-bits, in production?