From: Wincent Colaiuta Date: Mon, 21 Dec 2009 07:09:36 GMT Subject: Re: possible code error at run_command.c Message-ID: <2E55A685-834C-4C64-99F1-4060FEC7C2DB@wincent.com> In-Reply-To: <1976ea660912202246k45732bf2p111bbeb78047693e@mail.gmail.com> El 21/12/2009, a las 07:46, Frank Li escribió: > int start_command(struct child_process *cmd) > { > int need_in, need_out, need_err; > int fdin[2], fdout[2], fderr[2]; > int failed_errno = failed_errno; > > I have not found failed_errno as global variable. > failed_errno = failed_errno means nothing. > > It is possible coding error and should be > int failed_errno= 0 or > failed_errno=errno. Via "git blame": commit 5a7a3671b74c043216549b94a718da04cc3ffcd6 Author: David Soria Parra Date: Tue Aug 4 11:28:40 2009 +0200 run-command.c: squelch a "use before assignment" warning i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490) compiler (and probably others) mistakenly thinks variable failed_errno is used before assigned. Work it around by giving it a fake initialization. Signed-off-by: David Soria Parra Signed-off-by: Junio C Hamano Cheers, Wincent