Skip to content

Commit f2ddd9e

Browse files
committed
ref-filter: give uintmax_t to format with %PRIuMAX
As long as we are casting to a wider type, we should cast to the one with the correct signed-ness. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 59012fe commit f2ddd9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ref-filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static void grab_common_values(struct atom_value *val, int deref, struct expand_
897897
v->s = xstrdup(type_name(oi->type));
898898
else if (!strcmp(name, "objectsize:disk")) {
899899
v->value = oi->disk_size;
900-
v->s = xstrfmt("%"PRIuMAX, (intmax_t)oi->disk_size);
900+
v->s = xstrfmt("%"PRIuMAX, (uintmax_t)oi->disk_size);
901901
} else if (!strcmp(name, "objectsize")) {
902902
v->value = oi->size;
903903
v->s = xstrfmt("%lu", oi->size);

0 commit comments

Comments
 (0)