summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-04 15:55:35 +0000
committerWolfgang Denk <wd@denx.de>2011-11-07 22:14:02 +0100
commite1196b8005f7ab4cf3d0508019e3c13f5759e0d7 (patch)
treef966ad04233c2c4df66e036df2347ad2bb093217 /board
parentb8221a3b892c700a08022e20d6e817f9756651ea (diff)
downloadu-boot-imx-e1196b8005f7ab4cf3d0508019e3c13f5759e0d7.zip
u-boot-imx-e1196b8005f7ab4cf3d0508019e3c13f5759e0d7.tar.gz
u-boot-imx-e1196b8005f7ab4cf3d0508019e3c13f5759e0d7.tar.bz2
board/eltec/mhpc/flash.c: Fix GCC 4.6 build warning
Fix: flash.c: In function 'write_buff': flash.c:314:6: warning: variable 'count' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Frank Gottschling <fgottschling@eltec.de>
Diffstat (limited to 'board')
-rw-r--r--board/eltec/mhpc/flash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/board/eltec/mhpc/flash.c b/board/eltec/mhpc/flash.c
index 2fbdb27..8831328 100644
--- a/board/eltec/mhpc/flash.c
+++ b/board/eltec/mhpc/flash.c
@@ -311,7 +311,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
{
ulong cp, wp;
FPW data;
- int count, i, l, rc, port_width;
+ int i, l, rc, port_width;
if (info->flash_id == FLASH_UNKNOWN) {
return 4;
@@ -330,9 +330,9 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
*/
if ((l = addr - wp) != 0) {
data = 0;
- for (i=0, cp=wp; i<l; ++i, ++cp) {
+ for (i=0, cp=wp; i<l; ++i, ++cp)
data = (data << 8) | (*(uchar *)cp);
- }
+
for (; i<port_width && cnt>0; ++i) {
data = (data << 8) | *src++;
--cnt;
@@ -351,7 +351,6 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
/*
* handle word aligned part
*/
- count = 0;
while (cnt >= port_width) {
data = 0;
for (i=0; i<port_width; ++i) {