libcamera/utils/ipc
Naushir Patuck 5e4dc46a0c utils: mojom: Fix build error caused by the mojom tool update
The update to the mojom tool in commit d17de86904 causes build errors
with gcc 12.2 release builds. One such error is:

In file included from src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:18:
In static member function ‘static libcamera::ipa::RPi::ProcessParams libcamera::IPADataSerializer<libcamera::ipa::RPi::ProcessParams>::deserialize(std::vector<unsigned char>::const_iterator, std::vector<unsigned char>::const_iterator, libcamera::ControlSerializer*)’,
    inlined from ‘void IPAProxyRPiWorker::readyRead()’ at src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:302:70:
include/libcamera/ipa/raspberrypi_ipa_serializer.h:1172:32: error: ‘*(uint32_t*)((char*)&ret + offsetof(libcamera::ipa::RPi::ProcessParams, libcamera::ipa::RPi::ProcessParams::buffers.libcamera::ipa::RPi::BufferIds::bayer))’ may be used uninitialized [-Werror=maybe-uninitialized]
 1172 |                         return ret;

The failure is caused by the new auto-generated IPA interface not
initialising POD types to a default value. This is because the updated
mojom library uses a new mojom.ValueKind class to represent POD types,
whereas the interface generator script uses the mojom.Kind class, which
is correct for the older mojom library.

Fix this breakage by switching the interface generator script to use
mojom.ValueKind to test for POD types.

Fixes: d17de86904 ("utils: ipc: Update mojo")
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-02-15 11:38:25 +00:00
..
generators utils: mojom: Fix build error caused by the mojom tool update 2024-02-15 11:38:25 +00:00
mojo utils: ipc: Update mojo 2024-01-09 15:39:05 +00:00
tools utils: ipc: Update mojo 2024-01-09 15:39:05 +00:00
extract-docs.py utils: ipc: extract-docs: Fix escape characters in regex 2024-01-23 02:21:30 +02:00
generate.py utils: ipc: generate.py: Disable attributes checker 2024-01-09 15:39:05 +00:00
meson.build utils: ipc: Add script to extract doxygen docs from mojom files 2021-05-27 17:07:04 +09:00
parser.py utils: ipc: Update parser.py 2023-04-05 08:24:11 +03:00