diff mbox series

[meta-oe] thermald: Fix build with clang 23

Message ID 20260905015249.598172-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe] thermald: Fix build with clang 23 | expand

Commit Message

Khem Raj Sept. 5, 2026, 1:52 a.m. UTC
configure.ac appends -Werror on top of -Wall unless --disable-werror is
passed, so every warning a newer compiler learns turns into a hard build
failure.

clang 23 added -Wunused-but-set-global and enabled it under -Wall. It
fires on the "static gpointer <t_n>_parent_class = NULL" that glib's
G_DEFINE_TYPE() emits, which is assigned in the generated class_intern_init
but never read unless the type chains up to a parent vfunc. PrefObject in
thd_dbus_interface.cpp never does:

  src/thd_dbus_interface.cpp:48:1: error: variable 'pref_object_parent_class'
      set but not used [-Werror,-Wunused-but-set-global]
     48 | G_DEFINE_TYPE(PrefObject, pref_object, G_TYPE_OBJECT)

Pass --disable-werror, the escape hatch upstream added for exactly this,
rather than suppressing the individual warning - gcc does not know
-Wno-unused-but-set-global. OE's own -Werror=format-security is unaffected.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb b/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
index 937e9a5705..275fbf2b41 100644
--- a/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
+++ b/meta-oe/recipes-bsp/thermald/thermald_2.5.12.bb
@@ -29,6 +29,7 @@  do_configure:prepend () {

 EXTRA_OECONF = " \
                  --with-systemdsystemunitdir=${systemd_system_unitdir} \
+                 --disable-werror \
                  "

 FILES:${PN} += "${datadir}/dbus-1"