summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorLily Zhang <r58066@freescale.com>2012-03-09 21:16:51 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-05 14:58:06 -0400
commite3ce88896c4382b042b185a56776903e0e9082e2 (patch)
tree7a347cc34729bed1567b5eb0b3073b3efe156d40 /common
parent41a96ec1477bb8af4fdbe4f339658934305a175e (diff)
ENGR00176347-8 cmd_bootm: remove build warning
Remove the following build warning: cmd_bootm.c: In function 'do_booti': cmd_bootm.c:1524: warning: unused variable 'partno' cmd_bootm.c:1520: warning: unused variable 'pte' cmd_bootm.c:1654: warning: implicit declaration of function 'do_booti_linux' cmd_bootm.c:1596: warning: 'info.start' may be used uninitialized in this function cmd_bootm.c:1502: warning: 'addr' may be used uninitialized in this function Signed-off-by: Lily Zhang <r58066@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index ece7f7c3e3..1ee574de61 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -97,7 +97,7 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify);
static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char *argv[],
bootm_headers_t *images, ulong *os_data, ulong *os_len);
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
+extern void do_booti_linux(boot_img_hdr *hdr);
/*
* Continue booting an OS image; caller already has:
* - copied image header to global variable `header'
@@ -1499,7 +1499,7 @@ static unsigned char boothdr[512];
/* booti <addr> [ mmc0 | mmc1 [ <partition> ] ] */
int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
- unsigned addr;
+ unsigned addr = 0;
char *ptn = "boot";
int mmcc = -1;
boot_img_hdr *hdr = (void *)boothdr;
@@ -1517,19 +1517,18 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (mmcc != -1) {
#ifdef CONFIG_MMC
- struct fastboot_ptentry *pte;
struct mmc *mmc;
disk_partition_t info;
block_dev_desc_t *dev_desc = NULL;
- unsigned sector, partno = -1;
+ unsigned sector;
+ memset((void *)&info, 0 , sizeof(disk_partition_t));
/* i.MX use MBR as partition table, so this will have
to find the start block and length for the
partition name and register the fastboot pte we
define the partition number of each partition in
config file
*/
-
mmc = find_mmc_device(mmcc);
if (!mmc) {
printf("booti: cannot find '%d' mmc device\n", mmcc);