mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-09-23 23:30:19 +00:00
clang 23 enables -Wunused-template as part of -Wall (via -Wmost ->
-Wunused), where previously neither -Wall nor -Wextra turned it on.
libcamera builds with -Werror, so this now breaks the build:
In file included from include/libcamera/ipa/core_ipa_serializer.h:18:
include/libcamera/internal/ipa_data_serializer.h:57:3: error: unused
function template 'readPOD' [-Werror,-Wunused-template]
57 | T readPOD(std::vector<uint8_t> &vec, size_t pos)
| ^~~~~~~
The POD helpers sit in an anonymous namespace, so they have internal
linkage and clang diagnoses them per translation unit. appendPOD() and
the iterator overload of readPOD() are referenced by the
IPADataSerializer specialisations in the header itself, so they count as
used everywhere. The std::vector overload of readPOD() is not: nothing
in libcamera calls it, its only callers are the IPA proxies and proxy
workers generated at build time from the mojom templates. So it is
genuinely unused in every translation unit that is not generated proxy
code, which is what [[maybe_unused]] exists for.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>