public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image-fit: Fix compiler warning in fit_conf_print()
@ 2015-05-29 13:09 Hans de Goede
  2015-06-06  9:33 ` [U-Boot] " Hans de Goede
  2015-06-06 13:30 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2015-05-29 13:09 UTC (permalink / raw)
  To: u-boot

This fixes the following compiler warning:

In file included from tools/common/image-fit.c:1:0:
./tools/../common/image-fit.c: In function ?fit_conf_print?:
./tools/../common/image-fit.c:1470:27: warning: logical not is only applied
 to the left hand side of comparison [-Wlogical-not-parentheses]
    (const char **)&uname) > 0;

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 common/image-fit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 4bd8fea..28f7aa8 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1464,10 +1464,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
 
 	/* Print out all of the specified loadables */
 	for (loadables_index = 0;
-	     !fdt_get_string_index(fit, noffset,
+	     fdt_get_string_index(fit, noffset,
 			FIT_LOADABLE_PROP,
 			loadables_index,
-			(const char **)&uname) > 0;
+			(const char **)&uname) == 0;
 	     loadables_index++)
 	{
 		if (loadables_index == 0) {
-- 
2.4.1

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

* [U-Boot] image-fit: Fix compiler warning in fit_conf_print()
  2015-05-29 13:09 [U-Boot] [PATCH] image-fit: Fix compiler warning in fit_conf_print() Hans de Goede
@ 2015-06-06  9:33 ` Hans de Goede
  2015-06-06 13:30 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2015-06-06  9:33 UTC (permalink / raw)
  To: u-boot

Hi All,

On 29-05-15 15:09, Hans de Goede wrote:
> This fixes the following compiler warning:
>
> In file included from tools/common/image-fit.c:1:0:
> ./tools/../common/image-fit.c: In function ?fit_conf_print?:
> ./tools/../common/image-fit.c:1470:27: warning: logical not is only applied
>   to the left hand side of comparison [-Wlogical-not-parentheses]
>      (const char **)&uname) > 0;

ping? it would be nice to get this fixed, as it is the only compiler warning
I see when building u-boot.

Tom, can you pick this one up directly perhaps?

Regards,

Hans


>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>   common/image-fit.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/image-fit.c b/common/image-fit.c
> index 4bd8fea..28f7aa8 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -1464,10 +1464,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
>
>   	/* Print out all of the specified loadables */
>   	for (loadables_index = 0;
> -	     !fdt_get_string_index(fit, noffset,
> +	     fdt_get_string_index(fit, noffset,
>   			FIT_LOADABLE_PROP,
>   			loadables_index,
> -			(const char **)&uname) > 0;
> +			(const char **)&uname) == 0;
>   	     loadables_index++)
>   	{
>   		if (loadables_index == 0) {
>

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

* [U-Boot] image-fit: Fix compiler warning in fit_conf_print()
  2015-05-29 13:09 [U-Boot] [PATCH] image-fit: Fix compiler warning in fit_conf_print() Hans de Goede
  2015-06-06  9:33 ` [U-Boot] " Hans de Goede
@ 2015-06-06 13:30 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-06-06 13:30 UTC (permalink / raw)
  To: u-boot

On Fri, May 29, 2015 at 03:09:48PM +0200, Hans de Goede wrote:

> This fixes the following compiler warning:
> 
> In file included from tools/common/image-fit.c:1:0:
> ./tools/../common/image-fit.c: In function ?fit_conf_print?:
> ./tools/../common/image-fit.c:1470:27: warning: logical not is only applied
>  to the left hand side of comparison [-Wlogical-not-parentheses]
>     (const char **)&uname) > 0;
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150606/4cd94f18/attachment.sig>

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

end of thread, other threads:[~2015-06-06 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 13:09 [U-Boot] [PATCH] image-fit: Fix compiler warning in fit_conf_print() Hans de Goede
2015-06-06  9:33 ` [U-Boot] " Hans de Goede
2015-06-06 13:30 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox