From 340ba69c35102d97112817f06e1dbe6dbec807b1 Mon Sep 17 00:00:00 2001 From: Ricardo Simoes Date: Fri, 28 Jun 2024 11:12:56 +0200 Subject: magic-enum: Disable unused-value warning in tests With gcc 14.1.0, there is one compilation warning found in the unit tests which cause ptest builds to fail: test_containers.cpp:290:89: error: value computed is not used [-Werror=unused-value] 290 | magic_enum::containers::set color_set_not_const {Color::RED, Color::GREEN, Color::BLUE}; | This is the same behavior as described in [1]. Thus, we can safely treat this specific warning not as an error until the gcc bug is fixed. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=114970 Signed-off-by: Ricardo Simoes Signed-off-by: Mark Jonas Reported-by: Martin Jansa Signed-off-by: Khem Raj --- meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb index 096f869c30..ee547f6348 100644 --- a/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb +++ b/meta-oe/recipes-extended/magic-enum/magic-enum_0.9.5.bb @@ -30,6 +30,9 @@ do_install_ptest () { install -m 0755 ${B}/test/test_* ${D}${PTEST_PATH}/tests } +# Workaround for bug 114970 reported for gcc 14.1.0 +CXXFLAGS += "-Wno-error=unused-value" + # Add catkin and colcon (ROS build system) support FILES:${PN}-dev += "\ ${datadir}/magic_enum/package.xml \ -- cgit v1.2.3-54-g00ecf