diff options
author | Lily Zhang <r58066@freescale.com> | 2012-03-09 21:16:51 +0800 |
---|---|---|
committer | Lily Zhang <r58066@freescale.com> | 2012-03-13 14:55:12 +0800 |
commit | e3303f5b59df570c1f76b043d85e42be3dc7a63f (patch) | |
tree | 7a347cc34729bed1567b5eb0b3073b3efe156d40 /common | |
parent | 09b87ad3c1ef65e3ec090806ae1c48365e6c45d8 (diff) | |
download | u-boot-imx-e3303f5b59df570c1f76b043d85e42be3dc7a63f.zip u-boot-imx-e3303f5b59df570c1f76b043d85e42be3dc7a63f.tar.gz u-boot-imx-e3303f5b59df570c1f76b043d85e42be3dc7a63f.tar.bz2 |
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.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index ece7f7c..1ee574d 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); |