From: Jonathan Nieder Date: Wed, 27 Apr 2011 01:16:14 GMT Subject: Re: [PATCH] run-command.c: Fix unused variables warning with gcc 4.6 Message-ID: <20110427011614.GA14181@elie> In-Reply-To: <4DB6BA5E.3040306@elegosoft.com> Hi Michael, Michael Schubert wrote: > As of gcc 4.6 -Wall includes -Wunused-but-set-variable. Remove all > unused variables to prevent those warnings. As the other Michael mentioned, this patch replaces one warning with another. You might like a111eb7 (run-command: handle short writes and EINTR in die_child, 2011-04-20, aka jn/run-command-error-failure in "pu"), which eliminates both. Andreas, a patch on top to short-circuit away the later writes on error doesn't sound bad to me if you'd like, though it seems like a bit of an edge case. Thanks, all. Jonathan