runners: Fixed 64-bit overflow when size_t < bench_io_t

Long story short: %zd != %jd!

This was a simple oversight when writing the bench printing code, and
easy to miss on x86_64 and other modern PCs, but the mistake becomes
very apparent when trying to bench under qemu in thumb mode!
This commit is contained in:
Christopher Haster
2025-08-29 22:23:45 -05:00
parent 0698c49e1b
commit b94f9fe071
+3 -3
View File
@@ -659,7 +659,7 @@ void bench_stop(const char *m) {
for (size_t i = 0; i < bench_record_count; i++) {
if (strcmp(bench_records[i].m, m) == 0) {
// print results
printf("benched %s %zd %"PRIu64" %"PRIu64" %"PRIu64"\n",
printf("benched %s %jd %"PRIu64" %"PRIu64" %"PRIu64"\n",
bench_records[i].m,
bench_records[i].n,
readed - bench_records[i].last_readed,
@@ -684,7 +684,7 @@ void bench_stop(const char *m) {
void bench_result(const char *m, uintmax_t n, uintmax_t result) {
// we just print these directly
printf("benched %s %zd %"PRIu64"\n",
printf("benched %s %jd %"PRIu64"\n",
m,
n,
result);
@@ -692,7 +692,7 @@ void bench_result(const char *m, uintmax_t n, uintmax_t result) {
void bench_fresult(const char *m, uintmax_t n, double result) {
// we just print these directly
printf("benched %s %zd %.6f\n",
printf("benched %s %jd %.6f\n",
m,
n,
result);