[U-Boot] [PATCH] image: Fix loop condition to avoid warning

Simon Glass sjg at chromium.org
Fri Aug 21 19:53:07 CEST 2015


On 20 August 2015 at 03:45, Thierry Reding <thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> GCC 5.1 starts warning for comparisons such as !a > 0, assuming that the
> negation was meant to apply to the whole expression rather than just the
> left operand.
>
> Indeed the comparison in the FIT loadable code is confusingly written,
> though it does end up doing the right thing. Rewrite the condition to be
> more explicit, that is, iterate over strings until they're exhausted.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  common/image.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list