From: Remy Bohmer Date: Sat, 19 Feb 2011 18:56:28 +0000 (+0100) Subject: Fix build warnings in cmd_flash.c X-Git-Tag: v2011.03-rc2~45 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3a26c43e422c514f17297302adde8d743349ccf9;p=oweals%2Fu-boot.git Fix build warnings in cmd_flash.c These variables are only used in case CONFIG_SYS_NO_FLASH is NOT set: struct mtd_device *dev; struct part_info *part; u8 dev_type, dev_num, pnum; Signed-off-by: Remy Bohmer --- diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 4493948ec4..bd49b796c6 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -459,15 +459,15 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flash_info_t *info; ulong bank; int i, n, sect_first, sect_last; -#endif /* CONFIG_SYS_NO_FLASH */ -#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH) - ulong addr_first, addr_last; -#endif #if defined(CONFIG_CMD_MTDPARTS) struct mtd_device *dev; struct part_info *part; u8 dev_type, dev_num, pnum; #endif +#endif /* CONFIG_SYS_NO_FLASH */ +#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH) + ulong addr_first, addr_last; +#endif #ifdef CONFIG_HAS_DATAFLASH int status; #endif