git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] avoid "defined but not used" warning for fetch_objs_via_walker

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 21, 2007, 18:05 UTC
Message-ID
<Pine.LNX.4.64.0711211303460.32410@iabervon.org>
In-Reply-To
<7v63zwhy4i.fsf@gitster.siamese.dyndns.org>
On Tue, 20 Nov 2007, Junio C Hamano wrote:
Show 18 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > 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.

I think we're likely to do sftp someday, but everything is likely to get reorganized before that anyway.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C Hamano
Message 3 of 3 in “avoid "defined but not used" warning for fetch_objs_via_walker”
  1. avoid "defined but not used" warning for fetch_objs_via_walkerJeff King, Nov 18, 2007
  2. Junio C HamanoNov 21, 2007
  3. Daniel BarkalowNov 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.