summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorDavid Soria Parra <dsp@php.net>2009-08-04 11:28:40 +0200
committerJunio C Hamano <gitster@pobox.com>2009-08-04 10:04:29 -0700
commit5a7a3671b74c043216549b94a718da04cc3ffcd6 (patch)
tree0b91be4fc2e589e778baf934a91a0299b946b722 /run-command.c
parent90e41a89caa464a84e13cbc9378b0348a61f713b (diff)
downloadgit-5a7a3671b74c043216549b94a718da04cc3ffcd6.tar.gz
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 <dsp@php.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c
index b613bddc71..71f83368c4 100644
--- a/run-command.c
+++ b/run-command.c
@@ -19,7 +19,7 @@ int start_command(struct child_process *cmd)
{
int need_in, need_out, need_err;
int fdin[2], fdout[2], fderr[2];
- int failed_errno;
+ int failed_errno = failed_errno;
/*
* In case of errors we must keep the promise to close FDs