Skip to content

Commit

Permalink
run-command.c: squelch a "use before assignment" warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Soria Parra authored and Junio C Hamano committed Aug 4, 2009
1 parent 90e41a8 commit 5a7a367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a7a367

Please sign in to comment.