Subject: Re: [PATCH 2/2] --pretty=format: on-demand format expansion

From: René Scharfe <[email-masked]>
Date: Sat, 10 Nov 2007 00:20:22 +0100

Jeff King schrieb:
> On Fri, Nov 09, 2007 at 01:49:42AM +0100, René Scharfe wrote:
> 
>> +	strbuf_expand(sb, format, placeholders, format_commit_item, (void *)commit);
> 
> This void cast is pointless, since all pointers types convert implicitly
> to void pointers anyway. At best, it does nothing, and at worst, it
> hides an actual type error if the function signature or the type of
> 'commit' change.

When commit (of type const struct commit*) is implicitly converted to
void *, gcc complains because the "const" qualifier is silently dropped.