netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiaosuo@gmail.com
Cc: hadi@cyberus.ca, timo.teras@iki.fi, herbert@gondor.apana.org.au,
	adobriyan@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] xfrm: potential uninitialized variable num_xfrms
Date: Wed, 28 Apr 2010 09:41:55 -0700 (PDT)	[thread overview]
Message-ID: <20100428.094155.09744376.davem@davemloft.net> (raw)
In-Reply-To: <1272439222-2935-1-git-send-email-xiaosuo@gmail.com>

From: Changli Gao <xiaosuo@gmail.com>
Date: Wed, 28 Apr 2010 15:20:22 +0800

> potential uninitialized variable num_xfrms
> 
> fix compiler warning: 'num_xfrms' may be used uninitialized in this function.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

We've all been seeing it for weeks too, but I honestly have
reservations about trying to simply pacify the compiler here.

The num_xfrms variable is only used in code paths that actually
initialize it's value.  The compiler just can't see this in the
control flow.

Check it if you don't believe me.

  reply	other threads:[~2010-04-28 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28  7:20 [PATCH] xfrm: potential uninitialized variable num_xfrms Changli Gao
2010-04-28 16:41 ` David Miller [this message]
2010-04-30 23:40 ` David Miller

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=20100428.094155.09744376.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=adobriyan@gmail.com \
    --cc=hadi@cyberus.ca \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=timo.teras@iki.fi \
    --cc=xiaosuo@gmail.com \
    /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).