Files
Khem Raj b3d8c68897 libcamera: Fix build with clang 23
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>
2026-09-07 19:06:03 -07:00
..