summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-07-25 15:54:17 -0400
committerWolfgang Denk <wd@denx.de>2010-08-04 00:43:53 +0200
commit78e1e8467795d681b3f5f75140ba175e79954273 (patch)
treea7c76656e3814404986d67c2e9c6b35ff3ab9b07 /common
parent36448c6038aa06a7f031fd5c4141224b513ed838 (diff)
downloadtalos-obmc-uboot-78e1e8467795d681b3f5f75140ba175e79954273.tar.gz
talos-obmc-uboot-78e1e8467795d681b3f5f75140ba175e79954273.zip
bootm: fix pointer warning with lzma
Avoid warning: cmd_bootm.c: In function 'bootm_load_os': cmd_bootm.c:394: warning: passing argument 2 of 'lzmaBuffToBuffDecompress' from incompatible pointer type For 32 bit systems, this change shouldn't make a difference to code size since sizeof(size_t) and sizeof(unsigned int) are equal. But it does fix the warning. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index adfa6cd18a..594bccbbe0 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -386,12 +386,14 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
break;
#endif /* CONFIG_BZIP2 */
#ifdef CONFIG_LZMA
- case IH_COMP_LZMA:
+ case IH_COMP_LZMA: {
+ SizeT lzma_len = unc_len;
printf (" Uncompressing %s ... ", type_name);
int ret = lzmaBuffToBuffDecompress(
- (unsigned char *)load, &unc_len,
+ (unsigned char *)load, &lzma_len,
(unsigned char *)image_start, image_len);
+ unc_len = lzma_len;
if (ret != SZ_OK) {
printf ("LZMA: uncompress or overwrite error %d "
"- must RESET board to recover\n", ret);
@@ -400,6 +402,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
}
*load_end = load + unc_len;
break;
+ }
#endif /* CONFIG_LZMA */
#ifdef CONFIG_LZO
case IH_COMP_LZO:
OpenPOWER on IntegriCloud