From 9442f6fdda6fb7a71bcb54dc5581ea6f708093c0 Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Tue, 19 May 2026 16:41:03 +0200 Subject: [PATCH 1/3] Make explicit that STATE_COUNT is also an invalid state --- score/mw/com/impl/bindings/lola/subscription_helpers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/score/mw/com/impl/bindings/lola/subscription_helpers.cpp b/score/mw/com/impl/bindings/lola/subscription_helpers.cpp index f039455d5..b6a84285b 100644 --- a/score/mw/com/impl/bindings/lola/subscription_helpers.cpp +++ b/score/mw/com/impl/bindings/lola/subscription_helpers.cpp @@ -67,6 +67,7 @@ SubscriptionState SubscriptionStateMachineStateToSubscriptionState(SubscriptionS return SubscriptionState::kSubscribed; case SubscriptionStateMachineState::SUBSCRIPTION_PENDING_STATE: return SubscriptionState::kSubscriptionPending; + case SubscriptionStateMachineState::STATE_COUNT: default: SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE(false, "Invalid subscription state"); } From 72404f82a556fb15aba3a89ce922fba2120d0ac5 Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Tue, 19 May 2026 16:41:44 +0200 Subject: [PATCH 2/3] Make sure that no new warnings are introduced The existing warnings in score/communication are not treated as errors as a temporary solution to enforce no warnings as soon as possible. Such warnings shall be fixed in follow ups. --- .bazelrc | 19 +++++++++++++++++++ MODULE.bazel | 3 +++ 2 files changed, 22 insertions(+) diff --git a/.bazelrc b/.bazelrc index ac799333a..e8174ac88 100644 --- a/.bazelrc +++ b/.bazelrc @@ -30,6 +30,25 @@ build --incompatible_strict_action_env test --test_output=errors build --experimental_retain_test_configuration_across_testonly #https://github.com/bazelbuild/bazel/issues/6842 +# Do not treat as errors the warnings from external libraries that are known +build --per_file_copt=external/.*json_schema_validator.*@-Wno-error=switch +build --host_per_file_copt=external/.*json_schema_validator.*@-Wno-error=switch +build --per_file_copt=external/.*json_schema_validator.*@-Wno-error=switch-enum +build --host_per_file_copt=external/.*json_schema_validator.*@-Wno-error=switch-enum +build --per_file_copt=external/.*json_schema_validator.*@-Wno-error=range-loop-construct +build --host_per_file_copt=external/.*json_schema_validator.*@-Wno-error=range-loop-construct +build --per_file_copt=external/.*googletest.*@-Wno-error=switch-enum +build --host_per_file_copt=external/.*googletest.*@-Wno-error=switch-enum +build --per_file_copt=external/.*google_benchmark.*@-Wno-error=switch-enum +build --host_per_file_copt=external/.*google_benchmark.*@-Wno-error=switch-enum +build --per_file_copt=external/.*flatbuffers.*@-Wno-error=switch-enum +build --host_per_file_copt=external/.*flatbuffers.*@-Wno-error=switch-enum + +# Places with warnings that we need to fix +build --per_file_copt=score/mw/com/impl/bindings/lola/slot_decrementer.*@-Wno-error=self-move +build --per_file_copt=score/mw/com/impl/bindings/lola/messaging/message_passing_service_instance_methods_test.*@-Wno-error=unused-but-set-variable +build --per_file_copt=score/mw/com/impl/skeleton_base_test.*@-Wno-error=self-move + common:linux_x86_64_score_gcc_12_2_0_posix --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix common:linux_x86_64_score_gcc_12_2_0_posix --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux common:linux_aarch64_score_gcc_12_2_0_posix --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix diff --git a/MODULE.bazel b/MODULE.bazel index 21efb946f..d883a3e12 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -66,6 +66,9 @@ gcc_toolchains.toolchain( name = "gcc_toolchain_x86_64", extra_cxxflags = [ "-fdiagnostics-color=always", # Adds copt to always use coloring in build output + "-Wswitch-enum", + "-Werror", + "-Wno-error=deprecated-declarations", ], extra_ldflags = [ "-lstdc++", From 9349b046c7bf7945a96c6e2dbed2e61bf66c33d2 Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Wed, 20 May 2026 11:35:42 +0200 Subject: [PATCH 3/3] Suppress all warnings for the file with warnings Ideally we would just suppress only the affected warning until it is fixed but we cannot do that because such warning does not exist in qcc. --- .bazelrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index e8174ac88..11995a017 100644 --- a/.bazelrc +++ b/.bazelrc @@ -45,9 +45,9 @@ build --per_file_copt=external/.*flatbuffers.*@-Wno-error=switch-enum build --host_per_file_copt=external/.*flatbuffers.*@-Wno-error=switch-enum # Places with warnings that we need to fix -build --per_file_copt=score/mw/com/impl/bindings/lola/slot_decrementer.*@-Wno-error=self-move +build --per_file_copt=score/mw/com/impl/bindings/lola/slot_decrementer.*@-w build --per_file_copt=score/mw/com/impl/bindings/lola/messaging/message_passing_service_instance_methods_test.*@-Wno-error=unused-but-set-variable -build --per_file_copt=score/mw/com/impl/skeleton_base_test.*@-Wno-error=self-move +build --per_file_copt=score/mw/com/impl/skeleton_base_test.*@-w common:linux_x86_64_score_gcc_12_2_0_posix --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix common:linux_x86_64_score_gcc_12_2_0_posix --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux