mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 18:22:02 +02:00
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>
This commit is contained in:
@@ -135,6 +135,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
|
|||||||
int offset;
|
int offset;
|
||||||
size_t length;
|
size_t length;
|
||||||
int len;
|
int len;
|
||||||
|
ulong size;
|
||||||
ulong load_addr, load_ptr;
|
ulong load_addr, load_ptr;
|
||||||
void *src;
|
void *src;
|
||||||
ulong overhead;
|
ulong overhead;
|
||||||
@@ -197,11 +198,13 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,
|
|||||||
IS_ENABLED(CONFIG_SPL_GZIP) &&
|
IS_ENABLED(CONFIG_SPL_GZIP) &&
|
||||||
image_comp == IH_COMP_GZIP &&
|
image_comp == IH_COMP_GZIP &&
|
||||||
type == IH_TYPE_KERNEL) {
|
type == IH_TYPE_KERNEL) {
|
||||||
|
size = length;
|
||||||
if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN,
|
if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN,
|
||||||
src, &length)) {
|
src, &size)) {
|
||||||
puts("Uncompressing error\n");
|
puts("Uncompressing error\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
length = size;
|
||||||
} else {
|
} else {
|
||||||
memcpy((void *)load_addr, src, length);
|
memcpy((void *)load_addr, src, length);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user