Skip to content

Commit 269b053

Browse files
committed
fixup! survey: start pretty printing data in table form
This is needed for the i686 builds where sizeof(size_t) != sizeof(uintmax_t). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 97efdc3 commit 269b053

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/survey.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,22 +357,22 @@ static void survey_report_plaintext_refs(struct survey_context *ctx)
357357
strvec_push(&table.header, _("Count"));
358358

359359
if (ctx->opts.refs.want_all_refs || ctx->opts.refs.want_branches) {
360-
char *fmt = xstrfmt("%"PRIuMAX"", refs->branches_nr);
360+
char *fmt = xstrfmt("%"PRIuMAX"", (uintmax_t)refs->branches_nr);
361361
insert_table_rowv(&table, _("Branches"), fmt, NULL);
362362
free(fmt);
363363
}
364364

365365
if (ctx->opts.refs.want_all_refs || ctx->opts.refs.want_remotes) {
366-
char *fmt = xstrfmt("%"PRIuMAX"", refs->remote_refs_nr);
366+
char *fmt = xstrfmt("%"PRIuMAX"", (uintmax_t)refs->remote_refs_nr);
367367
insert_table_rowv(&table, _("Remote refs"), fmt, NULL);
368368
free(fmt);
369369
}
370370

371371
if (ctx->opts.refs.want_all_refs || ctx->opts.refs.want_tags) {
372-
char *fmt = xstrfmt("%"PRIuMAX"", refs->tags_nr);
372+
char *fmt = xstrfmt("%"PRIuMAX"", (uintmax_t)refs->tags_nr);
373373
insert_table_rowv(&table, _("Tags (all)"), fmt, NULL);
374374
free(fmt);
375-
fmt = xstrfmt("%"PRIuMAX"", refs->tags_annotated_nr);
375+
fmt = xstrfmt("%"PRIuMAX"", (uintmax_t)refs->tags_annotated_nr);
376376
insert_table_rowv(&table, _("Tags (annotated)"), fmt, NULL);
377377
free(fmt);
378378
}

0 commit comments

Comments
 (0)