summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-08-30 11:00:09 -0600
committerSimon Glass <sjg@chromium.org>2013-09-03 13:29:24 -0600
commit628af1790ac3231455c1ae4a4e43b67136799fa2 (patch)
treea26f846a88ca4702e867428a40fed7c6b8562420 /common/cmd_bootm.c
parentfb18fa95a14ae875ef0a5421cd9fecc00c7c3a4c (diff)
downloadu-boot-imx-628af1790ac3231455c1ae4a4e43b67136799fa2.zip
u-boot-imx-628af1790ac3231455c1ae4a4e43b67136799fa2.tar.gz
u-boot-imx-628af1790ac3231455c1ae4a4e43b67136799fa2.tar.bz2
sandbox: Correct compiler warnings in cmd_bootm/cmd_ximg
Correct the following warnings found with sandbox when compression is enabled. cmd_bootm.c: In function 'bootm_load_os': cmd_bootm.c:443:11: warning: passing argument 4 of 'lzop_decompress' from incompatible pointer type [enabled by default] /usr/local/google/c/cosarm/src/third_party/u-boot/files/include/linux/lzo.h:31:5: note: expected 'size_t *' but argument is of type 'uint *' cmd_ximg.c: In function 'do_imgextract': cmd_ximg.c:225:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cmd_ximg.c:225:14: warning: 'hdr' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1685c14..2dd2642 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -436,11 +436,12 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
}
#endif /* CONFIG_LZMA */
#ifdef CONFIG_LZO
- case IH_COMP_LZO:
+ case IH_COMP_LZO: {
+ size_t size;
+
printf(" Uncompressing %s ... ", type_name);
- ret = lzop_decompress(image_buf, image_len, load_buf,
- &unc_len);
+ ret = lzop_decompress(image_buf, image_len, load_buf, &size);
if (ret != LZO_E_OK) {
printf("LZO: uncompress or overwrite error %d "
"- must RESET board to recover\n", ret);
@@ -449,8 +450,9 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
return BOOTM_ERR_RESET;
}
- *load_end = load + unc_len;
+ *load_end = load + size;
break;
+ }
#endif /* CONFIG_LZO */
default:
printf("Unimplemented compression type %d\n", comp);