Re: [RFC/PATCH 0/5] macro-based key/value maps
- From
Jeff King <peff@peff.net>
- Date
- Aug 6, 2011, 06:30 UTC
- Message-ID
- <20110806063052.GA3583@sigill.intra.peff.net>
- In-Reply-To
- <4E3C0CD9.4020902@lsrfire.ath.cx>
On Fri, Aug 05, 2011 at 05:31:37PM +0200, René Scharfe wrote:
Show 13 quoted lines
> Am 05.08.2011 13:03, schrieb Jeff King: > > Commits 1, 4, and 5 introduce infrastructure in the form of static > > functions and macros that contain functions that call the statics. But > > they don't actually instantiate the macro functions themselves, so > > they won't compile with -Werror (due to the "unused static" warning) > > until there is some calling code. > > > > That hurts bisectability a little if you compile with -Werror (you > > need to add -Wno-error=unused-function). I don't know how much we > > care. > > I don't know either, but you could avoid the issue by adding a test-maps > command in the first patch and exercising the new functionality a bit.
Yes, but then the final git executable carries around dead code for the test map and cache types. There are ways to split the macros versus their instantiation so that the test instantiations only live in the test-map program, but then that would bring back the "static is not used" error.
Maybe carrying the dead code isn't that big a deal. It's not that much extra code.
-Peff