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

Tom Rini trini at konsulko.com
Fri Aug 28 23:01:58 CEST 2015


On Thu, Aug 20, 2015 at 11:45:43AM +0200, Thierry Reding 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>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

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/20150828/0caa3039/attachment.sig>


More information about the U-Boot mailing list