Skip to content

Commit b91f1f0

Browse files
committed
fix conversion warning on 32-bit
1 parent bff836f commit b91f1f0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/stats.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ static void mi_stat_counter_print_size(const mi_stat_counter_t* stat, const char
236236
_mi_fprintf(out, arg, "\n");
237237
}
238238

239-
static void mi_stat_average_print(size_t count, size_t total, const char* msg, mi_output_fun* out, void* arg) {
239+
static void mi_stat_average_print(int64_t count, int64_t total, const char* msg, mi_output_fun* out, void* arg) {
240240
const int64_t avg_tens = (count == 0 ? 0 : (total*10 / count));
241-
const long avg_whole = (long)(avg_tens/10);
242-
const long avg_frac1 = (long)(avg_tens%10);
243-
_mi_fprintf(out, arg, "%10s: %5ld.%ld avg\n", msg, avg_whole, avg_frac1);
241+
const int64_t avg_whole = avg_tens/10;
242+
const int64_t avg_frac1 = avg_tens%10;
243+
_mi_fprintf(out, arg, "%10s: %5lld.%lld avg\n", msg, avg_whole, avg_frac1);
244244
}
245245

246246

0 commit comments

Comments
 (0)