提交 bf1d6440 编写于 作者: A Anatolij Gustschin 提交者: Heiko Schocher

board/xaeniax/flash.c: Fix GCC 4.6 warnings

Fix:
flash.c: In function 'flash_erase':
flash.c:223:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:392:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
Signed-off-by: NAnatolij Gustschin <agust@denx.de>
上级 c0fe04bf
...@@ -220,7 +220,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info) ...@@ -220,7 +220,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info)
int flash_erase (flash_info_t *info, int s_first, int s_last) int flash_erase (flash_info_t *info, int s_first, int s_last)
{ {
int flag, prot, sect; int prot, sect;
ulong type, start; ulong type, start;
int rcode = 0; int rcode = 0;
...@@ -255,7 +255,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) ...@@ -255,7 +255,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
} }
/* Disable interrupts which might cause a timeout here */ /* Disable interrupts which might cause a timeout here */
flag = disable_interrupts (); disable_interrupts();
/* Start erase on unprotected sectors */ /* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) { for (sect = s_first; sect <= s_last; sect++) {
...@@ -389,7 +389,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data) ...@@ -389,7 +389,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
{ {
FPWV *addr = (FPWV *) dest; FPWV *addr = (FPWV *) dest;
ulong status; ulong status;
int flag;
ulong start; ulong start;
/* Check if Flash is (sufficiently) erased */ /* Check if Flash is (sufficiently) erased */
...@@ -398,7 +397,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data) ...@@ -398,7 +397,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
return (2); return (2);
} }
/* Disable interrupts which might cause a timeout here */ /* Disable interrupts which might cause a timeout here */
flag = disable_interrupts (); disable_interrupts();
*addr = (FPW) 0x00400040; /* write setup */ *addr = (FPW) 0x00400040; /* write setup */
*addr = data; *addr = data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册