git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: CAPig+cQ49Hdc_8=mRhhJDTny_Kqo6Wg6Nr98rsBN_YXmBrQ6kA@mail.gmail.com,
	git@vger.kernel.org, phillip.wood123@gmail.com,
	sunshine@sunshineco.com, "Sören Krecker" <soekkle@freenet.de>
Subject: Re: [PATCH v3 1/4] add-patch: Fix type conversion warnings from msvc
Date: Mon, 27 Jan 2025 08:10:24 -0800	[thread overview]
Message-ID: <xmqq1pwow83z.fsf@gitster.g> (raw)
In-Reply-To: <Z5c1EIXi7nsB2kJe@pks.im> (Patrick Steinhardt's message of "Mon, 27 Jan 2025 08:26:08 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> Note: the word after the subject's subsystem should start with a
> lower-case letter.
>
> On Sun, Jan 26, 2025 at 01:56:35PM +0100, Sören Krecker wrote:
>> Fix some compiler warnings from msvc in add-patch.c for value truncation
>> form 64 bit to 32 bit integers. Change unsigned long to size_t for
>> correct variable size on linux and windows.
>> Add macro str_to_size_t for converting a string to size_t.
>
> There shouldn't be a need for this macro, we already have `strtoumax()`.
> And in case the platform doesn't provide it we know to provide our own
> implementation.

Thanks for a detailed review; I'll omit them as I agree with all you
said there.

If I pretend for a while that moving from ulong to size_t is a good
change for line numbers and line counts in the first place, that is.

In other words, I agree with all the improvements your comments
suggest to the _implementation_.

Thanks.

  reply	other threads:[~2025-01-27 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-26 12:56 [PATCH v3 0/4] Fix type conversion Warings from msvc Sören Krecker
2025-01-26 12:56 ` [PATCH v3 1/4] add-patch: Fix type conversion warnings " Sören Krecker
2025-01-27  7:26   ` Patrick Steinhardt
2025-01-27 16:10     ` Junio C Hamano [this message]
2025-01-29 16:51   ` Phillip Wood
2025-01-29 19:52     ` Junio C Hamano
2025-01-30 10:47       ` Phillip Wood
2025-01-30 19:24         ` Junio C Hamano
2025-01-27  7:26 ` [PATCH v3 0/4] Fix type conversion Warings " Patrick Steinhardt

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=xmqq1pwow83z.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=CAPig+cQ49Hdc_8=mRhhJDTny_Kqo6Wg6Nr98rsBN_YXmBrQ6kA@mail.gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=ps@pks.im \
    --cc=soekkle@freenet.de \
    --cc=sunshine@sunshineco.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).