summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-10 18:15:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-10 18:15:49 (GMT)
commitf2ddd9e53f3202b70352d65eee60ad71581f129f (patch)
treed9e731e718ae39aeead5b418dcb9d989f8be805a
parent59012fe5e8f7485a48544324054f24aebfff3b38 (diff)
downloadgit-f2ddd9e53f3202b70352d65eee60ad71581f129f.zip
git-f2ddd9e53f3202b70352d65eee60ad71581f129f.tar.gz
git-f2ddd9e53f3202b70352d65eee60ad71581f129f.tar.bz2
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 <gitster@pobox.com>
-rw-r--r--ref-filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index d8d3718..b22cab1 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -897,7 +897,7 @@ static void grab_common_values(struct atom_value *val, int deref, struct expand_
v->s = xstrdup(type_name(oi->type));
else if (!strcmp(name, "objectsize:disk")) {
v->value = oi->disk_size;
- v->s = xstrfmt("%"PRIuMAX, (intmax_t)oi->disk_size);
+ v->s = xstrfmt("%"PRIuMAX, (uintmax_t)oi->disk_size);
} else if (!strcmp(name, "objectsize")) {
v->value = oi->size;
v->s = xstrfmt("%lu", oi->size);