git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Soria Parra <dsp@php.net>
To: git@vger.kernel.org
Subject: Re: [PATCH] checkout: squelch "'mode' may be used uninitialized in this function" warning
Date: Thu, 3 May 2012 10:59:24 +0000 (UTC)	[thread overview]
Message-ID: <slrnjq4p8c.i00.dsp@experimentalworks.net> (raw)
In-Reply-To: 1335825567-7831-1-git-send-email-dsp@php.net

Any update on this patch? Is it going to maint?

On 2012-04-30, dsp@php.net <dsp@php.net> wrote:
> From: David Soria Parra <dsp@php.net>
>
> Use a 'fake' initialization for the 'mode' variable to work around a
> GCC warning as in 5a7a367. The necessary condition to initialize 'mode'
> will always be true but cannot be checked by the compiler.
>
> Signed-off-by: David Soria Parra <dsp@php.net>
> ---
>  builtin/checkout.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 84d3eb3..6b8bf31 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -157,7 +157,7 @@ static int checkout_merged(int pos, struct checkout *state)
>  	unsigned char sha1[20];
>  	mmbuffer_t result_buf;
>  	unsigned char threeway[3][20];
> -	unsigned mode;
> +	unsigned mode = mode;
>  
>  	memset(threeway, 0, sizeof(threeway));
>  	while (pos < active_nr) {

  reply	other threads:[~2012-05-03 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 22:39 [PATCH] checkout: squelch "'mode' may be used uninitialized in this function" warning dsp
2012-05-03 10:59 ` David Soria Parra [this message]
2012-05-08 20:26   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnjq4p8c.i00.dsp@experimentalworks.net \
    --to=dsp@php.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).