Patchwork [U-Boot,04/13] board/evb64260/evb64260.c: Fix GC 4.6 build warning

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 9, 2011, 7:28 p.m.
Message ID <1320866946-28235-4-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/124666/
State Accepted
Commit 54a087464d4624dd2fd183b4e44f7b7e90f1acd8
Headers show

Comments

Wolfgang Denk - Nov. 9, 2011, 7:28 p.m.
Fix:
evb64260.c: In function 'debug_led':
evb64260.c:363:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]

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

In message <1320866946-28235-4-git-send-email-wd@denx.de> you wrote:
> Fix:
> evb64260.c: In function 'debug_led':
> evb64260.c:363:6: warning: variable 'dummy' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
>  board/evb64260/evb64260.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/evb64260/evb64260.c b/board/evb64260/evb64260.c
index 80756a5..393320a 100644
--- a/board/evb64260/evb64260.c
+++ b/board/evb64260/evb64260.c
@@ -32,6 +32,7 @@ 
 #include <galileo/gt64260R.h>
 #include <net.h>
 #include <netdev.h>
+#include <linux/compiler.h>
 
 #include <asm/io.h>
 #include "eth.h"
@@ -360,7 +361,7 @@  debug_led(int led, int mode)
 {
 #if !defined(CONFIG_ZUMA_V2) && !defined(CONFIG_P3G4)
 	volatile int *addr = NULL;
-	int dummy;
+	__maybe_unused int dummy;
 
 	if (mode == 1) {
 		switch (led) {