All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument
@ 2017-09-14 19:41 York Sun
  2017-09-15 15:10 ` Jean-Jacques Hiblot
  2017-09-16  2:32 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: York Sun @ 2017-09-14 19:41 UTC (permalink / raw)
  To: u-boot

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>
---

 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;
 		}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument
  2017-09-14 19:41 [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument York Sun
@ 2017-09-15 15:10 ` Jean-Jacques Hiblot
  2017-09-15 15:11   ` York Sun
  2017-09-16  2:32 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2017-09-15 15:10 UTC (permalink / raw)
  To: u-boot

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 <york.sun@nxp.com>
> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>
>   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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument
  2017-09-15 15:10 ` Jean-Jacques Hiblot
@ 2017-09-15 15:11   ` York Sun
  0 siblings, 0 replies; 5+ messages in thread
From: York Sun @ 2017-09-15 15:11 UTC (permalink / raw)
  To: u-boot

On 09/15/2017 08:10 AM, Jean-Jacques Hiblot wrote:
> 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 <york.sun@nxp.com>
>> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>
>>    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;

You are correct. I will send an update. Thanks.

York

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] spl: Fix compiling warning on gunzip argument
  2017-09-14 19:41 [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument York Sun
  2017-09-15 15:10 ` Jean-Jacques Hiblot
@ 2017-09-16  2:32 ` Tom Rini
  2017-09-16  2:34   ` Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2017-09-16  2:32 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 14, 2017 at 12:41:38PM -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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] spl: Fix compiling warning on gunzip argument
  2017-09-16  2:32 ` [U-Boot] " Tom Rini
@ 2017-09-16  2:34   ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2017-09-16  2:34 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 15, 2017 at 10:32:49PM -0400, Tom Rini wrote:
> On Thu, Sep 14, 2017 at 12:41:38PM -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>
> 
> Applied to u-boot/master, thanks!

No, no I didn't.  I had this email queued, and forgot to delete it.

-- 
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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-16  2:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 19:41 [U-Boot] [PATCH] spl: Fix compiling warning on gunzip argument York Sun
2017-09-15 15:10 ` Jean-Jacques Hiblot
2017-09-15 15:11   ` York Sun
2017-09-16  2:32 ` [U-Boot] " Tom Rini
2017-09-16  2:34   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.