stageGain is uninitialized in RISC-V

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue May 28 15:43:29 CEST 2024


On Tue, May 28, 2024 at 12:48:51PM +0100, Kieran Bingham wrote:
> Hi,
> 
> Quoting U2FsdGVkX1 (2024-05-28 03:31:28)
> > In RISC-V, when optimization is enabled, it will fail to build with
> > the following:
> > ../src/ipa/libipa/exposure_mode_helper.cpp:210:52: error: ‘stageGain’
> > may be used uninitialized [-Werror=maybe-uninitialized]
> >   210 |         shutter = clampShutter(exposure / clampGain(stageGain));
> >       |                                           ~~~~~~~~~^~~~~~~~~~~
> > ../src/ipa/libipa/exposure_mode_helper.cpp:169:16: note: ‘stageGain’
> > was declared here
> >   169 |         double stageGain;
> >       |                ^~~~~~~~~
> > 
> > I posted an issue on GitHub and need more people to test it
> > https://github.com/kbingham/libcamera/pull/95
> 
> That github repo is just my personal fork, it's not a public development
> tree.
> 
> The best way forwards is to post the patch (perhaps after considering
> updating the comment that you moved appropriately) to this list to be
> able to discuss it, and work towards getting it merged.
> 
> It may be a compiler false positive or specific to the RISC-V compiler
> as we haven't been able to reproduce it yet, but I know Laurent is
> looking to add GCC14 to our build CI soon.

CI patches are on the list, waiting for reviews :-)

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list