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

Re: git on HP NonStop

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Aug 20, 2012, 10:56 UTC
Message-ID
<503217F2.5070105@viscovery.net>
In-Reply-To
<000701cd7ebf$af552aa0$0dff7fe0$@schmitz-digital.de>
Am 8/20/2012 12:36, schrieb Joachim Schmitz:
Show 7 quoted lines
> int var = var;
> char *othervar = othervar;
> 
> ... 
>
> What is the reason for using that self-init stuff? I don't think it is
> really portable, is it?

It is used to avoid "var may be used uninitialized" warnings for some compilers. Officially (according to the C standard), it is undefined behavior. But I've observed considerable resistance by Junio to fix this properly. Therefore, unless you can show that your compiler generates unusable code you better live with the "self-initialization" warnings.

-- Hannes
Previous: Joachim SchmitzNext: Joachim Schmitz
Message 4 of 11 in “RE: git on HP NonStop”
  1. Joachim SchmitzAug 14, 2012
  2. Jan EngelhardtAug 19, 2012
  3. Joachim SchmitzAug 20, 2012
  4. Johannes SixtAug 20, 2012
  5. Joachim SchmitzAug 20, 2012
  6. Junio C HamanoAug 20, 2012
  7. Joachim SchmitzAug 20, 2012
  8. Junio C HamanoAug 21, 2012
  9. Joachim SchmitzAug 22, 2012
  10. Andreas EricssonAug 23, 2012
  11. Joachim SchmitzAug 23, 2012

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.