* [U-Boot] [PATCH] board/xaeniax/flash.c: Fix GCC 4.6 warnings
@ 2011-11-19 20:17 Anatolij Gustschin
2011-11-23 7:33 ` Heiko Schocher
0 siblings, 1 reply; 2+ messages in thread
From: Anatolij Gustschin @ 2011-11-19 20:17 UTC (permalink / raw)
To: u-boot
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: Anatolij Gustschin <agust@denx.de>
---
board/xaeniax/flash.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/board/xaeniax/flash.c b/board/xaeniax/flash.c
index 6cb0aca..836c87e 100644
--- a/board/xaeniax/flash.c
+++ b/board/xaeniax/flash.c
@@ -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 flag, prot, sect;
+ int prot, sect;
ulong type, start;
int rcode = 0;
@@ -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 */
- flag = disable_interrupts ();
+ disable_interrupts();
/* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) {
@@ -389,7 +389,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
{
FPWV *addr = (FPWV *) dest;
ulong status;
- int flag;
ulong start;
/* Check if Flash is (sufficiently) erased */
@@ -398,7 +397,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
return (2);
}
/* Disable interrupts which might cause a timeout here */
- flag = disable_interrupts ();
+ disable_interrupts();
*addr = (FPW) 0x00400040; /* write setup */
*addr = data;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] board/xaeniax/flash.c: Fix GCC 4.6 warnings
2011-11-19 20:17 [U-Boot] [PATCH] board/xaeniax/flash.c: Fix GCC 4.6 warnings Anatolij Gustschin
@ 2011-11-23 7:33 ` Heiko Schocher
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Schocher @ 2011-11-23 7:33 UTC (permalink / raw)
To: u-boot
Hello Anatolij,
Anatolij Gustschin wrote:
> 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: Anatolij Gustschin <agust@denx.de>
> ---
> board/xaeniax/flash.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
Applied to u-boot-staging hs at denx.de
Thanks.
bye,
Heiko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-23 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 20:17 [U-Boot] [PATCH] board/xaeniax/flash.c: Fix GCC 4.6 warnings Anatolij Gustschin
2011-11-23 7:33 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox