From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 19 Nov 2011 10:04:54 -0800 Subject: [U-Boot] [PATCH 8/9] ARM: cerf250: fix GCC 4.6 warings In-Reply-To: <1321703956-4224-9-git-send-email-agust@denx.de> References: <1321703956-4224-1-git-send-email-agust@denx.de> <1321703956-4224-9-git-send-email-agust@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Nov 19, 2011 at 3:59 AM, 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 Acked-by: Simon Glass > --- > ?board/cerf250/flash.c | ? ?7 +++---- > ?1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/board/cerf250/flash.c b/board/cerf250/flash.c > index e1e7807..bf8f0c9 100644 > --- a/board/cerf250/flash.c > +++ b/board/cerf250/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 > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot >