All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Оля Тележная" <olyatelezhnaya@gmail.com>
Cc: git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 0/5] ref-filter: add new formatting options
Date: Thu, 10 Jan 2019 10:17:59 -0800	[thread overview]
Message-ID: <xmqqpnt42x7s.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAL21Bm=stCR8-yJ-eh396veQ2kAoGwLX5ci_T0N-6femAwk4jA@mail.gmail.com> (=?utf-8?B?ItCe0LvRjyDQotC10LvQtdC20L3QsNGPIidz?= message of "Thu, 10 Jan 2019 09:25:40 +0300")

Оля Тележная  <olyatelezhnaya@gmail.com> writes:

> Just fixed 1 cast from (intmax_t) to (uintmax_t).

Thanks.

As the previous one already is in 'next', let's queue this on top of
it instead.

-- >8 --
Subject: [PATCH] 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>
---
 ref-filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ref-filter.c b/ref-filter.c
index d8d3718abb..b22cab133e 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);
-- 
2.20.1-98-gecbdaf0899


      parent reply	other threads:[~2019-01-10 18:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09  7:37 [RFC PATCH 0/5] ref-filter: add new formatting options Оля Тележная
2018-11-09  7:44 ` [RFC PATCH 1/5] ref-filter: add objectsize:disk option Olga Telezhnaya
2018-11-09  7:44   ` [RFC PATCH 4/5] ref-filter: add tests for deltabase Olga Telezhnaya
2018-11-09  7:44   ` [RFC PATCH 5/5] ref-filter: add docs for new options Olga Telezhnaya
2018-11-12  5:24     ` Junio C Hamano
2018-11-09  7:44   ` [RFC PATCH 3/5] ref-filter: add deltabase option Olga Telezhnaya
2018-11-09  7:44   ` [RFC PATCH 2/5] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2018-11-12  5:03   ` [RFC PATCH 1/5] ref-filter: add objectsize:disk option Junio C Hamano
2018-11-12 12:03     ` Johannes Schindelin
2018-11-12 13:12       ` Jeff King
2018-11-13  1:52         ` Junio C Hamano
2018-11-20  9:17           ` Оля Тележная
2018-11-21  0:27             ` Junio C Hamano
2018-11-22 11:33               ` Johannes Schindelin
2018-11-24  1:48                 ` Junio C Hamano
2018-11-12 13:05     ` Jeff King
2018-12-24 13:16 ` [PATCH v2 0/5] ref-filter: add new formatting options Оля Тележная
2018-12-24 13:24   ` [PATCH v2 1/6] ref-filter: add objectsize:disk option Olga Telezhnaya
2018-12-24 13:24     ` [PATCH v2 3/6] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2018-12-24 13:24     ` [PATCH v2 2/6] ref-filter: add check for negative file size Olga Telezhnaya
2018-12-24 13:24     ` [PATCH v2 5/6] ref-filter: add tests for deltabase Olga Telezhnaya
2018-12-24 13:24     ` [PATCH v2 4/6] ref-filter: add deltabase option Olga Telezhnaya
2018-12-24 13:24     ` [PATCH v2 6/6] ref-filter: add docs for new options Olga Telezhnaya
2018-12-26 20:44     ` [PATCH v2 1/6] ref-filter: add objectsize:disk option Junio C Hamano
2019-01-10  6:25   ` [PATCH v2 0/5] ref-filter: add new formatting options Оля Тележная
2019-01-10  6:32     ` [PATCH v3 1/6] ref-filter: add objectsize:disk option Olga Telezhnaya
2019-01-10  6:32       ` [PATCH v3 4/6] ref-filter: add deltabase option Olga Telezhnaya
2019-01-10  6:32       ` [PATCH v3 5/6] ref-filter: add tests for deltabase Olga Telezhnaya
2019-01-10  6:32       ` [PATCH v3 3/6] ref-filter: add tests for objectsize:disk Olga Telezhnaya
2019-01-10  6:32       ` [PATCH v3 6/6] ref-filter: add docs for new options Olga Telezhnaya
2019-01-10  6:32       ` [PATCH v3 2/6] ref-filter: add check for negative file size Olga Telezhnaya
2019-01-10 18:17     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpnt42x7s.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=olyatelezhnaya@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.