[libcamera-devel] [PATCH] qcam: viewfinder_gl: selectColorSpace: fix maybe uninitialized warning
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Sep 2 23:48:43 CEST 2022
Hi Marco,
On Fri, Sep 02, 2022 at 04:42:55PM +0200, Marco Felsch wrote:
> On 22-09-02, Laurent Pinchart wrote:
> > On Fri, Sep 02, 2022 at 04:11:36PM +0200, Marco Felsch via libcamera-devel wrote:
> > > Fix gcc11 warning introduced in commit 251f0534 ("qcam: viewfinder_gl:
> > > Take color space into account for YUV rendering"). Fix it by making the
> > > full range as default.
> >
> > What exact compiler version are you using ? gcc 11.3.0 compiles the code
> > fine here. It seems to be a false positive, but if it causes breakages,
> > we of course want to fix/work around the problem.
>
> Arg.. I'm using 11.1.1 from the official OSELAS.Toolchain-2021.07.0
> cross-toolchain. So it seems my gcc-11 is to old.
I think this is a false positive caused by a bug in gcc, which seems to
have been fixed in later releases. gcc 10.4.0, 11.3.0 and 12.2.0 all
compile libcamera without warning, in both debug and release modes. I
have however been able to reproduce the issue with gcc 12.1.0 (along
with a second warning that complains about the yuv2rgb matrix being used
uninitialized).
This being said, as the problem affects real use cases, we'll fix it.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list