Re: [PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Jonathan Nieder
Thomas Rast wrote: > Jonathan Nieder writes: >> Thomas Rast wrote: >>> This shuts up compiler warnings about unused functions. >> >> If that is the only goal, I think it would be cleaner to use >> >> #define MAYBE_UNUSED __attribute__((__unused__)) >> >> static MAYBE_UNUSED void init_ .

Re: [PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Junio C Hamano
Jonathan Nieder writes: > Thomas Rast wrote: > >> This shuts up compiler warnings about unused functions. > > If that is the only goal, I think it would be cleaner to use > > #define MAYBE_UNUSED __attribute__((__unused__)) > > static MAYBE_UNUSED void init_ ... > > like was done in t

Re: [PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Junio C Hamano
Thomas Rast writes: > Here's a version that has a fat comment instead of the removal. > > Also, since I was rerolling anyway I put a reason why we need this. > In the original motivation I actually created more functions > afterwards, which made it more convincing, but the problem already > exist

Re: [PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Thomas Rast
Jonathan Nieder writes: > Thomas Rast wrote: > >> This shuts up compiler warnings about unused functions. > > If that is the only goal, I think it would be cleaner to use > > #define MAYBE_UNUSED __attribute__((__unused__)) > > static MAYBE_UNUSED void init_ ... > > like was done in t

Re: [PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Jonathan Nieder
Thomas Rast wrote: > This shuts up compiler warnings about unused functions. If that is the only goal, I think it would be cleaner to use #define MAYBE_UNUSED __attribute__((__unused__)) static MAYBE_UNUSED void init_ ... like was done in the vcs-svn/ directory until cba3546 (d

[PATCH v2] commit-slab: declare functions "static inline"

2013-11-25 Thread Thomas Rast
This shuts up compiler warnings about unused functions. No such warnings are currently triggered, but if someone were to actually use init_NAME_with_stride() as documented, they would get a warning about init_NAME() being unused. While there, write a comment about why we need two declarations of