Re: [PATCH] avoid "defined but not used" warning for fetch_objs_via_walker
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 21, 2007, 07:10 UTC
- Message-ID
- <7v63zwhy4i.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20071118081722.GA31563@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> Because this function is static and used only by the > http-walker, when NO_CURL is defined, gcc emits a "defined > but not used" warning. > > Signed-off-by: Jeff King <peff@peff.net> > --- > On master. I like to compile with -Werror to make sure I don't miss > warnings as the compile scrolls by. > > This fix feels a little wrong, since the function isn't specific to http > support, but hopefully the comment should be obvious if we ever add > another similar commit walker that needs it.
Yeah, while I share your -Werror desire it sure feels a bit dirty. As it does not look like we will be taking any new walkers, I think your patch is reasonable, though.