Patchwork [U-Boot,07/13] board/apollon/sys_info.c: Fix GCC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Dec. 9, 2011, 11:14 a.m.
Message ID <1323429272-26801-8-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/130345/
State Accepted
Headers show

Comments

Wolfgang Denk - Dec. 9, 2011, 11:14 a.m.
Fix:
sys_info.c: In function 'display_board_info':
sys_info.c:260:16: warning: variable 'db_s' set but not used
[-Wunused-but-set-variable]

Also fix resulting warnings:
sys_info.c:251:7: warning: unused variable 'db_ip' [-Wunused-variable]
sys_info.c:250:7: warning: unused variable 'db_men' [-Wunused-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 board/apollon/sys_info.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
Wolfgang Denk - Dec. 10, 2011, 10:10 p.m.
Dear Wolfgang Denk,

In message <1323429272-26801-8-git-send-email-wd@denx.de> you wrote:
> Fix:
> sys_info.c: In function 'display_board_info':
> sys_info.c:260:16: warning: variable 'db_s' set but not used
> [-Wunused-but-set-variable]
> 
> Also fix resulting warnings:
> sys_info.c:251:7: warning: unused variable 'db_ip' [-Wunused-variable]
> sys_info.c:250:7: warning: unused variable 'db_men' [-Wunused-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  board/apollon/sys_info.c |    9 +--------
>  1 files changed, 1 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/apollon/sys_info.c b/board/apollon/sys_info.c
index 26ac9a2..4f950ae 100644
--- a/board/apollon/sys_info.c
+++ b/board/apollon/sys_info.c
@@ -247,8 +247,6 @@  void display_board_info(u32 btype)
 	char cpu_2420[] = "2420";	/* cpu type */
 	char cpu_2422[] = "2422";
 	char cpu_2423[] = "2423";
-	char db_men[] = "Menelaus";	/* board type */
-	char db_ip[] = "IP";
 	char mem_sdr[] = "mSDR";	/* memory type */
 	char mem_ddr[] = "mDDR";
 	char t_tst[] = "TST";	/* security level */
@@ -257,7 +255,7 @@  void display_board_info(u32 btype)
 	char t_gp[] = "GP";
 	char unk[] = "?";
 
-	char *cpu_s, *db_s, *mem_s, *sec_s;
+	char *cpu_s, *mem_s, *sec_s;
 	u32 cpu, rev, sec;
 
 	rev = get_cpu_rev();
@@ -276,11 +274,6 @@  void display_board_info(u32 btype)
 	else
 		cpu_s = cpu_2420;
 
-	if (btype == BOARD_H4_MENELAUS)
-		db_s = db_men;
-	else
-		db_s = db_ip;
-
 	switch (sec) {
 	case TST_DEVICE:
 		sec_s = t_tst;