spl: Fix compiling warning on gunzip argument
PATCH 1/1 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))
---
common/spl/spl_fit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
common/spl/spl_fit.c +3 -1
@@ -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 ; }
Signature · 1 line
2.7.4
PATCH 1/1 spl: Fix compiling warning on gunzip argument
Hi York,
Quoted 24 lines · York Sun
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 <[email protected]>Reported-by Heinrich Schuchardt <[email protected]>---
common/spl/spl_fit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)common/spl/spl_fit.c +1
-0@@ -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;
common/spl/spl_fit.c static int spl_load_fit_image(struct spl_load_info *info, ulong sector, · line 206
Quoted 10 lines
common/spl/spl_fit.c +2
-1@@ -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
PATCH 1/1 spl: Fix compiling warning on gunzip argument
Quoted 33 lines · Jean-Jacques Hiblot
Hi York,
Quoted 29 lines · York Sun
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 <[email protected]>Reported-by Heinrich Schuchardt <[email protected]>---
common/spl/spl_fit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)common/spl/spl_fit.c +2
-0@@ -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,
Quoted 8 lines
common/spl/spl_fit.c static int spl_load_fit_image(struct spl_load_info *info, ulong sector, · line 206
Quoted 5 lines
common/spl/spl_fit.c +1
-1- 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;
You are correct. I will send an update. Thanks.
York
Quoted 6 lines · York Sun
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 <[email protected]>Reported-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170915/b9a59300/attachment.sig>
Quoted 10 lines · Tom Rini
Quoted 6 lines · York Sun
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 <[email protected]>Reported-by Heinrich Schuchardt <[email protected]>Applied to u-boot/master, thanks!
No, no I didn't. I had this email queued, and forgot to delete it.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170915/475de978/attachment.sig>