All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_nand: Fix possible uninited max_size variable
Date: Tue, 27 Mar 2012 02:02:04 +0200	[thread overview]
Message-ID: <201203270202.04850.marex@denx.de> (raw)
In-Reply-To: <4F70969A.7050504@freescale.com>

Dear Scott Wood,

> On 03/23/2012 06:27 PM, Marek Vasut wrote:
> > GCC 4.7 error:
> > cmd_nand.c: In function ?arg_off_size?:
> > cmd_nand.c:216:5: warning: ?maxsize? may be used uninitialized in this
> > function [-Wmaybe-uninitialized]
> 
> Yay, with a new compiler comes a new batch of false positives. :-P

And I'm the early adopter ... crusader of new compiler tests with uboot ;-D

> 
> I'm surprised it complained at line 216 but not line 208.
> 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Scott Wood <scottwood@freescale.com>
> > ---
> > 
> >  common/cmd_nand.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> > index 035a6f6..b015d11 100644
> > --- a/common/cmd_nand.c
> > +++ b/common/cmd_nand.c
> > @@ -191,7 +191,7 @@ static int arg_off_size(int argc, char *const argv[],
> > int *idx,
> > 
> >  			loff_t *off, loff_t *size)
> >  
> >  {
> >  
> >  	int ret;
> > 
> > -	loff_t maxsize;
> > +	loff_t maxsize = 0;
> > 
> >  	if (argc == 0) {
> >  	
> >  		*off = 0;
> 
> I'll apply for next merge window.
> 
> -Scott
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Best regards,
Marek Vasut

      reply	other threads:[~2012-03-27  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 23:27 [U-Boot] [PATCH] cmd_nand: Fix possible uninited max_size variable Marek Vasut
2012-03-26 16:17 ` Scott Wood
2012-03-27  0:02   ` Marek Vasut [this message]

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=201203270202.04850.marex@denx.de \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.