Subject: Re: [PATCH 21/49] builtin/repack.c: factor our "generated_pack_install"

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 8 Oct 2025 06:28:24 +0200

On Tue, Oct 07, 2025 at 04:26:26PM -0400, Taylor Blau wrote:
> On Tue, Sep 30, 2025 at 01:21:46AM +0200, Patrick Steinhardt wrote:
> > On Sun, Sep 28, 2025 at 06:08:31PM -0400, Taylor Blau wrote:
> > > +	for_each_string_list_item(item, &names)
> > > +		generated_pack_install((struct generated_pack *)item->util,
> >
> > This cast should be unnecessary, right? `item->util` is a void pointer,
> > so C should do the cast implicitly.
> 
> It's unnecessary, but I dislike implicit casts from 'void*' to any other
> type. This makes it clearer how we're supposed to interpret the value in
> item->util, but I'm happy to change it to use the implicit cast if you
> feel strongly about it.

I think it's common practice to not have such an explicit cast in our
code base. But in any case, I don't feel strongly about this.

Patrick