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

Re: [PATCH] submodule.c: Squelch a "use before assignment" warning

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 22, 2009, 02:59 UTC
Message-ID
<7vws1jl0xp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<c5plt6-5me.ln1@burns.bruehl.pontohonk.de>
Christoph Bartoschek <bartoschek@gmx.de> writes:
> Why is the compiler not complaining about the fake initalization? For 
> initialization a value is used that is not initialized.

That is a fairly well established idiom to tell gcc "you may mistakenly think it isn't, but this is used".

Previous: Christoph BartoschekNext: Junio C Hamano
Message 5 of 6 in “submodule.c: Squelch a "use before assignment" warning”
  1. submodule.c: Squelch a "use before assignment" warningDavid Aguilar, Nov 20, 2009
  2. Junio C HamanoNov 20, 2009
  3. submodule.c: Squelch a "use before assignment" warningDavid Aguilar, Nov 20, 2009
  4. Christoph BartoschekNov 21, 2009
  5. Junio C HamanoNov 22, 2009
  6. Junio C HamanoNov 22, 2009

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.