summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2017-09-15 08:21:13 -0700
committerJason Liu <jason.hui.liu@nxp.com>2017-11-03 02:37:23 +0800
commitfe24f51ac1e47752a425b49931dc172fba9ecc31 (patch)
treecf902b83ff3107bbd6b5818c07b55d2c5682f580 /common
parentf0eade5fd77675fe9259019c92f7a5a58c3e7207 (diff)
spl: Fix compiling warning on gunzip argument
common/spl/spl_fit.c:201:12: warning: passing argument 4 of ‘gunzip’ from incompatible pointer type [-Wincompatible-pointer-types] src, &length)) Signed-off-by: York Sun <york.sun@nxp.com> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> CC: Jean-Jacques Hiblot <jjhiblot@ti.com> (cherry picked from commit 933f67aa56ea742f014b21bfe50a16a00e97b9bd)
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_fit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 49ccf1c17b..32d9ee5901 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -135,6 +135,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
int offset;
size_t length;
int len;
+ ulong size;
ulong load_addr, load_ptr;
void *src;
ulong overhead;
@@ -197,11 +198,13 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
IS_ENABLED(CONFIG_SPL_GZIP) &&
image_comp == IH_COMP_GZIP &&
type == IH_TYPE_KERNEL) {
+ size = length;
if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN,
- src, &length)) {
+ src, &size)) {
puts("Uncompressing error\n");
return -EIO;
}
+ length = size;
} else {
memcpy((void *)load_addr, src, length);
}