stageGain is uninitialized in RISC-V

Kieran Bingham kieran.bingham at ideasonboard.com
Tue May 28 13:48:51 CEST 2024


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.

--
Regards

Kieran


More information about the libcamera-devel mailing list