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

Re: [PATCH] Fix compiler warning by properly initialize failed_errno

From
sn_ <sn_@gmx.net>
Date
Aug 4, 2009, 09:27 UTC
Message-ID
<20090804092759.24120@gmx.net>
In-Reply-To
<7vmy6g6rj1.fsf@alter.siamese.dyndns.org>
Show 10 quoted lines
> The potentially uninitialized use your compiler is worried about is inside
> if (cmd->pid < 0) after #ifdef/#else/#endif.
> 
>  (1) if not on MINGW32, we would have already assigned to failed_errno
>      after fork() returns negative value to cmd->pid;
> 
>  (2) if on MINGW32, we would have assigned to failed_errno unconditionally
>      after calling mingw_spawnvpe().
> 
> so its worry is unfounded.
The worry is definatly unfounded, but I think it's still worth to apply the attached patch to get rid of the warning using the i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) compiler. I sended a corrected version of the patch to the ml.
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Fix compiler warning by properly initialize failed_errno”
  1. Fix compiler warning by properly initialize failed_errnoDavid Soria Parra, Aug 2, 2009
  2. Junio C HamanoAug 4, 2009
  3. sn_Aug 4, 2009
  4. Junio C HamanoAug 4, 2009
  5. Johannes SixtAug 4, 2009
  6. Junio C HamanoAug 4, 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.