Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
ref-filter: give uintmax_t to format with %PRIuMAX
author
Junio C Hamano
<gitster@pobox.com>
Thu, 10 Jan 2019 18:15:49 +0000
(10:15 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 10 Jan 2019 18:15:49 +0000
(10:15 -0800)
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>
ref-filter.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
59012fe
)
diff --git
a/ref-filter.c
b/ref-filter.c
index d8d3718abbf931b0d52a80148f3f5986516cc163..b22cab133e1b1f6a917553ffa7a03303c2cd461b 100644
(file)
--- 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 = 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, (
u
intmax_t)oi->disk_size);
} else if (!strcmp(name, "objectsize")) {
v->value = oi->size;
v->s = xstrfmt("%lu", oi->size);
} else if (!strcmp(name, "objectsize")) {
v->value = oi->size;
v->s = xstrfmt("%lu", oi->size);