From: Wolfgang Denk Date: Wed, 7 Dec 2011 23:19:24 +0100 Subject: [U-Boot] [PATCH 5/9] board/w7o/fpga.c: Fix GCC 4.6 build warning In-Reply-To: <1323296368-26162-1-git-send-email-wd@denx.de> References: <1323296368-26162-1-git-send-email-wd@denx.de> Message-ID: <1323296368-26162-6-git-send-email-wd@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- board/w7o/fpga.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/board/w7o/fpga.c b/board/w7o/fpga.c index c3d3c80..774f2ec 100644 --- a/board/w7o/fpga.c +++ b/board/w7o/fpga.c @@ -26,6 +26,7 @@ #include #include "w7o.h" #include +#include #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 -- 1.7.6.4