Patchwork [U-Boot,09/14] post/board/lwmon5/gdc.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 30, 2011, 8:17 a.m.
Message ID <1322641077-829-10-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/128443/
State Accepted
Commit e607a15ddb5024a71b0f9e669fe819c1d8839d53
Headers show

Comments

Wolfgang Denk - Nov. 30, 2011, 8:17 a.m.
Fix:
gdc.c: In function 'gdc_test_reg_one':
gdc.c:66:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
total: 0 errors, 0 warnings, 14 lines checked
NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE

 post/board/lwmon5/gdc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Stefan Roese - Dec. 1, 2011, 8:55 a.m.
On Wednesday 30 November 2011 09:17:52 Wolfgang Denk wrote:
> Fix:
> gdc.c: In function 'gdc_test_reg_one':
> gdc.c:66:6: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>

Thanks.

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
Wolfgang Denk - Dec. 1, 2011, 11:14 p.m.
Dear Wolfgang Denk,

In message <1322641077-829-10-git-send-email-wd@denx.de> you wrote:
> Fix:
> gdc.c: In function 'gdc_test_reg_one':
> gdc.c:66:6: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> ---
> total: 0 errors, 0 warnings, 14 lines checked
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
> 
>  post/board/lwmon5/gdc.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/post/board/lwmon5/gdc.c b/post/board/lwmon5/gdc.c
index 719194b..6bbd2c2 100644
--- a/post/board/lwmon5/gdc.c
+++ b/post/board/lwmon5/gdc.c
@@ -63,13 +63,12 @@  const static unsigned long otherpattern = 0x01234567;
 /* test write/read og a given LIME Register */
 static int gdc_test_reg_one(uint value)
 {
-	int ret;
 	uint read_value;
 
 	/* write test pattern */
 	out_be32((void *)GDC_SCRATCH_REG, value);
 	/* read other location (protect against data lines capacity) */
-	ret = in_be32((void *)GDC_RAM_START);
+	in_be32((void *)GDC_RAM_START);
 	/* verify test pattern */
 	read_value = in_be32((void *)GDC_SCRATCH_REG);
 	if (read_value != value) {