Patchwork [U-Boot] common/cmd_nand.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date May 20, 2012, 9:52 p.m.
Message ID <1337550767-31944-1-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/160288/
State Accepted
Commit 10d4e0f9fe6cea504fab7ad4e4a958b565cf43af
Headers show

Comments

Anatolij Gustschin - May 20, 2012, 9:52 p.m.
cmd_nand.c: In function 'raw_access':
cmd_nand.c:397:9: warning: variable 'rwsize' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
---
 common/cmd_nand.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Wolfgang Denk - May 22, 2012, 8:16 a.m.
Dear Anatolij Gustschin,

In message <1337550767-31944-1-git-send-email-agust@denx.de> you wrote:
> cmd_nand.c: In function 'raw_access':
> cmd_nand.c:397:9: warning: variable 'rwsize' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
>  common/cmd_nand.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index f060a31..fa44295 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -394,7 +394,6 @@  static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count,
 			int read)
 {
 	int ret = 0;
-	size_t rwsize;
 
 	while (count--) {
 		/* Raw access */
@@ -406,7 +405,6 @@  static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count,
 			.mode = MTD_OOB_RAW
 		};
 
-		rwsize = nand->writesize + nand->oobsize;
 		if (read)
 			ret = nand->read_oob(nand, off, &ops);
 		else