]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board/w7o/fpga.c: Fix GCC 4.6 build warning
authorWolfgang Denk <wd@denx.de>
Wed, 7 Dec 2011 12:19:24 +0000 (12:19 +0000)
committerWolfgang Denk <wd@denx.de>
Thu, 8 Dec 2011 19:51:46 +0000 (20:51 +0100)
Fix:
fpga.c: In function 'fpgaDownload':
fpga.c:68:29: warning: variable 'val' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
board/w7o/fpga.c

index c3d3c801d7ba166bf475364ae82d0064b55bfb9d..774f2ecc6624fbc825761cdfbd8bfda84205698c 100644 (file)
@@ -26,6 +26,7 @@
 #include <common.h>
 #include "w7o.h"
 #include <asm/processor.h>
+#include <linux/compiler.h>
 #include "errors.h"
 
 static void
@@ -63,10 +64,10 @@ fpgaDownload(unsigned char *saddr, unsigned long size, unsigned short *daddr)
        unsigned long *source;  /* image source addr */
        unsigned short *dest;   /* destination FPGA addr */
        volatile unsigned short *ndest; /* temp dest FPGA addr */
-       volatile unsigned short val;    /* temp val */
        unsigned long cnfg = GPIO_XCV_CNFG;     /* FPGA CNFG */
        unsigned long eirq = GPIO_XCV_IRQ;
        int retval = -1;        /* Function return value */
+       __maybe_unused volatile unsigned short val;     /* temp val */
 
        /* Setup some basic values */
        length = (size / 4) + 1;        /* size in words, rounding UP