Message ID | 1505488875-9340-1-git-send-email-york.sun@nxp.com |
---|---|
State | Accepted |
Commit | 933f67aa56ea742f014b21bfe50a16a00e97b9bd |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot,v2] spl: Fix compiling warning on gunzip argument | expand |
On 09/15/2017 08:21 AM, 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 <york.sun@nxp.com> > Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > CC: Jean-Jacques Hiblot <jjhiblot@ti.com> > --- > Change log > v2: Update length after gunzip > Tom, Will you bring in this patch or you prefer a PR? I am about to send a PR in a day or two (pending travis-ci testing). York
On Wed, Sep 20, 2017 at 10:35:08PM +0000, York Sun wrote: > On 09/15/2017 08:21 AM, 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 <york.sun@nxp.com> > > Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > > CC: Jean-Jacques Hiblot <jjhiblot@ti.com> > > --- > > Change log > > v2: Update length after gunzip > > > > Tom, > > Will you bring in this patch or you prefer a PR? I am about to send a PR > in a day or two (pending travis-ci testing). I'll be picking this up shortly, thanks.
On Fri, Sep 15, 2017 at 08:21:13AM -0700, 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 <york.sun@nxp.com> > Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > CC: Jean-Jacques Hiblot <jjhiblot@ti.com> Applied to u-boot/master, thanks!
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 49ccf1c..32d9ee5 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); }
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> --- Change log v2: Update length after gunzip common/spl/spl_fit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)