Re: [PATCH 04/12] pack-objects: widen `free_unpacked()` return to `size_t`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 5, 2026, 09:23 UTC
- Message-ID
- <anMA--V_ec-WPBZq@pks.im>
- In-Reply-To
- <07d01200a48c79ba6b3da594d29d685b2c5865d0.1783615780.git.gitgitgadget@gmail.com>
On Thu, Jul 09, 2026 at 04:49:31PM +0000, Johannes Schindelin via GitGitGadget wrote:
Show 14 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index f89628a760..4737a6a32c 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -2972,9 +2972,9 @@ static unsigned int check_delta_limit(struct object_entry *me, unsigned int n)
> return m;
> }
>
> -static unsigned long free_unpacked(struct unpacked *n)
> +static size_t free_unpacked(struct unpacked *n)
> {
> - unsigned long freed_mem = sizeof_delta_index(n->index);
> + size_t freed_mem = sizeof_delta_index(n->index);Okay. As mentioned on a preceding patch, the function itself still returns `unsigned long`, which should probably also be corrected in this patch series.
Patrick