[PATCH] sandbox: p2sb: Silence compiler warning
Tom Rini
trini at konsulko.com
Mon Feb 10 20:02:16 CET 2020
On Mon, Feb 10, 2020 at 11:27:58AM -0700, Stephen Warren wrote:
> On 2/8/20 8:21 AM, Bin Meng wrote:
> > On Sat, Feb 8, 2020 at 10:53 PM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > Some compilers produce a warning about 'child' being used before init.
> > > Silence this by setting to NULL at the start.
> >
> > Should be a compiler bug I think. Which compiler has such issue?
>
> gcc 7.2.1 (Linaro build x86 -> ARM cross-compiler)
>
> I don't believe this is a compiler bug.
>
> For the compiler *not* to emit this warning, it would have to apply
> cross-function data flow analysis, which isn't something guaranteed by the C
> standard IIRC, since it's a very hard problem in general. So, not a compiler
> *bug* even if we'd like to see the compiler be smart about these things.
Is that a supported by them still compiler tho? We don't see that
warning with the gcc-7.3.0 from the kernel.org toolchains we use (or
travis wouldn't have been clean for Simon).
I'm assuming you're using that compiler to test as it's something that
otherwise fits in your test workflow.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200210/aac35b9f/attachment.sig>
More information about the U-Boot
mailing list