Re: [PATCH 2/2] commit-slab: declare functions "static inline"
Junio C Hamano <gitster@pobox.com> writes:
Show 24 quoted lines
> Thomas Rast <tr@thomasrast.ch> writes:
>
>> This shuts up compiler warnings about unused functions.
>
> Thanks.
>
>> While there, also remove the redundant second declaration of
>> stat_##slabname##realloc.
>
> I think the latter was done very much deliberately to allow the
> using code to say:
>
> define_commit_slab(name, type);
>
> by ending the macro with something that requires a terminating
> semicolon. If you just remove it, doesn't it break the compilation
> by forcing the expanded source to define a function
>
> slabname ## _at(...)
> {
> ...
> };
>
> with a trailing and undesired semicolon?Oooh. The sudden enlightenment.
--
Thomas Rast
tr@thomasrast.ch