public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_nand: Fix possible uninited max_size variable
Date: Mon, 26 Mar 2012 11:17:30 -0500	[thread overview]
Message-ID: <4F70969A.7050504@freescale.com> (raw)
In-Reply-To: <1332545238-877-1-git-send-email-marex@denx.de>

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

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

  reply	other threads:[~2012-03-26 16:17 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 [this message]
2012-03-27  0:02   ` Marek Vasut

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=4F70969A.7050504@freescale.com \
    --to=scottwood@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox