Patchwork [U-Boot,12/22] board/ep82xxm/ep82xxm.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 5, 2011, 3:13 p.m.
Message ID <1320505999-9770-13-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/123866/
State Accepted
Commit 419abb6af6e627196d68172dbb4c681fdac041e6
Headers show

Comments

Wolfgang Denk - Nov. 5, 2011, 3:13 p.m.
Fix:
ep82xxm.c: In function 'initdram':
ep82xxm.c:233:16: warning: variable 'ramtmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/ep82xxm/ep82xxm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Wolfgang Denk - Nov. 7, 2011, 9:48 p.m.
Dear Wolfgang Denk,

In message <1320505999-9770-13-git-send-email-wd@denx.de> you wrote:
> Fix:
> ep82xxm.c: In function 'initdram':
> ep82xxm.c:233:16: warning: variable 'ramtmp' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/ep82xxm/ep82xxm.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/ep82xxm/ep82xxm.c b/board/ep82xxm/ep82xxm.c
index c1d6e91..182cabc 100644
--- a/board/ep82xxm/ep82xxm.c
+++ b/board/ep82xxm/ep82xxm.c
@@ -31,6 +31,7 @@ 
 #include <pci.h>
 #endif
 #include <miiphy.h>
+#include <linux/compiler.h>
 
 /*
  * I/O Port configuration table
@@ -230,8 +231,8 @@  phys_size_t initdram(int board_type)
 	uint psdmr = CONFIG_SYS_PSDMR;
 	int i;
 
-	unsigned char	ramtmp;
 	unsigned char	*ramptr1 = (unsigned char *)0x00000110;
+	__maybe_unused unsigned char	ramtmp;
 
 	memctl->memc_mptpr = CONFIG_SYS_MPTPR;