diff mbox series

[meta-oe,121/128] avro-c++: relax -Werror=unused-but-set-variable for GCC 16

Message ID 20260628162222.4081517-21-khem.raj@oss.qualcomm.com
State New
Headers show
Series None | expand

Commit Message

Khem Raj June 28, 2026, 4:22 p.m. UTC
GCC 16 reports a set-but-unused variable in the JSON parser, and avro builds
with -Werror:

  lang/c++/impl/json/JsonIO.cc:296:30: error: variable 'n' set but not used
  [-Werror=unused-but-set-variable=]

Extend the existing toolchain-gcc -Wno-error workaround to cover it.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-support/avro/avro-c++_1.12.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb b/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb
index 729763d133..fdc7303280 100644
--- a/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb
+++ b/meta-oe/recipes-support/avro/avro-c++_1.12.1.bb
@@ -36,6 +36,6 @@  do_configure:prepend() {
 # the workaround flags aren't recognized by Clang either.
 # To avoid unnecessary warnings and keep the build clean across toolchains, the flags are conditionally added
 # using the toolchain-gcc override. This makes it unnecessary to override anything for Clang.
-CXXFLAGS:append:toolchain-gcc = " -Wno-error=useless-cast -Wno-error=conversion"
+CXXFLAGS:append:toolchain-gcc = " -Wno-error=useless-cast -Wno-error=conversion -Wno-error=unused-but-set-variable"
 
 BBCLASSEXTEND = "native nativesdk"