projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8221a3
)
board/eltec/mhpc/flash.c: Fix GCC 4.6 build warning
author
Wolfgang Denk
<wd@denx.de>
Fri, 4 Nov 2011 15:55:35 +0000
(15:55 +0000)
committer
Wolfgang Denk
<wd@denx.de>
Mon, 7 Nov 2011 21:14:02 +0000
(22:14 +0100)
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>
board/eltec/mhpc/flash.c
patch
|
blob
|
history
diff --git
a/board/eltec/mhpc/flash.c
b/board/eltec/mhpc/flash.c
index 2fbdb2771826451ba4dd7c540454f2bfee42200b..88313287f9f8c4bc5ce80be1a310451983e26eac 100644
(file)
--- 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) {