diff mbox

[U-Boot,28/56] mpc8xx/cpu.c: Fix GCC 4.6 build warnings

Message ID 1320458160-23136-29-git-send-email-wd@denx.de
State Accepted
Commit bae65019d754007054d702b9e86429fa19470b1e
Headers show

Commit Message

Wolfgang Denk Nov. 5, 2011, 1:55 a.m. UTC
Fix:
cpu.c: In function 'check_CPU':
cpu.c:188:8: warning: variable 'mid' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 arch/powerpc/cpu/mpc8xx/cpu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Wolfgang Denk Nov. 7, 2011, 9:13 p.m. UTC | #1
Dear Wolfgang Denk,

In message <1320458160-23136-29-git-send-email-wd@denx.de> you wrote:
> Fix:
> cpu.c: In function 'check_CPU':
> cpu.c:188:8: warning: variable 'mid' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  arch/powerpc/cpu/mpc8xx/cpu.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 142cfa5..5cbf9a6 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -40,6 +40,7 @@ 
 #include <commproc.h>
 #include <netdev.h>
 #include <asm/cache.h>
+#include <linux/compiler.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
@@ -185,7 +186,7 @@  static int check_CPU (long clock, uint pvr, uint immr)
 	uint k, m;
 	char buf[32];
 	char pre = 'X';
-	char *mid = "xx";
+	__maybe_unused char *mid = "xx";
 	char *suf;
 
 	/* the highest 16 bits should be 0x0050 for a 8xx */