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

Re: [PATCH] Sparse fixes for http-fetch

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Oct 13, 2005, 17:51 UTC
Message-ID
<434E9EA1.3030002@zytor.com>
In-Reply-To
<20051013174203.GA6860@peppar.cs.umu.se>
Peter Hagervall wrote:
Show 7 quoted lines
> This patch cleans out all sparse warnings from http-fetch.c
> 
> I'm a bit uncomfortable with adding extra #ifdefs to avoid either
> 'mixing declaration with code' or 'unused variable' warnings, but I
> figured that since those functions are already littered with #ifdefs I
> might just get away with it. Comments?
> 

For the first, you can use extra brackets to create blocks in which declarations can happen; for the latter, you can (void)var; to specify that a certain variable may be legitimately unused under some circumstances.

	-hpa
Previous: Peter HagervallNext: Junio C Hamano
Message 2 of 3 in “Sparse fixes for http-fetch”
  1. Sparse fixes for http-fetchPeter Hagervall, Oct 13, 2005
  2. H. Peter AnvinOct 13, 2005
  3. Junio C HamanoOct 13, 2005

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.