From: Jean-Jacques Hiblot Date: Fri, 15 Sep 2017 17:10:19 +0200 Subject: [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument In-Reply-To: <1505418098-4013-1-git-send-email-york.sun@nxp.com> References: <1505418098-4013-1-git-send-email-york.sun@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi York, On 14/09/2017 21:41, York Sun wrote: > 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 > Reported-by: Heinrich Schuchardt > --- > > common/spl/spl_fit.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > index 49ccf1c..82943cd 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,8 +198,9 @@ 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; > } Here I think you should add a length = size; because "length" is used a few lines after (ln 211) : image_info->size = length; JJ