diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 89085cbb6..e13f58c44 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -334,7 +334,7 @@ jobs: - name: Build language bindings # NOTE: the cmake command is in a single line since Windows complains about breaking up lines with '\' run: | - cmake -S . -B target/ffi/build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DTREAT_WARNING_AS_ERROR=ON ${{ matrix.mode.cmake-build-type }} ${{ matrix.mode.cmake-cxx-flags }} ${{ matrix.cmake-build-system-generator }} -DCMAKE_INSTALL_PREFIX=target/ffi/install -DCMAKE_PREFIX_PATH="${{ github.workspace }}/target/iceoryx/install" -DRUST_BUILD_ARTIFACT_PATH="${{ github.workspace }}/target/${{ matrix.mode.name }}" + cmake -S . -B target/ffi/build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DWARNING_AS_ERROR=ON ${{ matrix.mode.cmake-build-type }} ${{ matrix.mode.cmake-cxx-flags }} ${{ matrix.cmake-build-system-generator }} -DCMAKE_INSTALL_PREFIX=target/ffi/install -DCMAKE_PREFIX_PATH="${{ github.workspace }}/target/iceoryx/install" -DRUST_BUILD_ARTIFACT_PATH="${{ github.workspace }}/target/${{ matrix.mode.name }}" cmake --build target/ffi/build ${{ matrix.mode.cmake-build-config }} cmake --install target/ffi/build ${{ matrix.mode.cmake-build-config }} diff --git a/CMakeLists.txt b/CMakeLists.txt index f410b8fa9..2e1e605d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ add_option( ) add_option( - NAME TREAT_WARNING_AS_ERROR + NAME WARNING_AS_ERROR DESCRIPTION "Fails if the compiler emits a warning" DEFAULT_VALUE OFF ) @@ -116,7 +116,7 @@ add_rust_feature( RUST_FEATURE "iceoryx2/logger_tracing" ) -if(TREAT_WARNING_AS_ERROR) +if(WARNING_AS_ERROR) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -Wpedantic") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wpedantic") endif() diff --git a/examples/cxx/event_multiplexing/src/wait.cpp b/examples/cxx/event_multiplexing/src/wait.cpp index 00b661a2e..cf25bf1f2 100644 --- a/examples/cxx/event_multiplexing/src/wait.cpp +++ b/examples/cxx/event_multiplexing/src/wait.cpp @@ -22,8 +22,6 @@ #include "iox2/service_type.hpp" #include "iox2/waitset.hpp" -constexpr iox::units::Duration CYCLE_TIME = iox::units::Duration::fromSeconds(1); - // NOLINTBEGIN struct Args { IOX_CLI_DEFINITION(Args); @@ -42,7 +40,6 @@ auto main(int argc, char** argv) -> int { using namespace iox2; auto args = Args::parse(argc, argv, "Notifier of the event multiplexing example."); - auto event_id = EventId(args.event_id()); auto service_name_1 = ServiceName::create(args.service1().c_str()).expect("valid service name"); auto service_name_2 = ServiceName::create(args.service2().c_str()).expect("valid service name"); diff --git a/iceoryx2-ffi/cxx/src/node_name.cpp b/iceoryx2-ffi/cxx/src/node_name.cpp index c5a88c830..6e972ea9c 100644 --- a/iceoryx2-ffi/cxx/src/node_name.cpp +++ b/iceoryx2-ffi/cxx/src/node_name.cpp @@ -91,7 +91,7 @@ auto NodeName::create_impl(const char* value, size_t value_len) -> iox::expected iox2_node_name_h handle {}; const auto ret_val = iox2_node_name_new(nullptr, value, value_len, &handle); if (ret_val == IOX2_OK) { - return iox::ok(std::move(NodeName { handle })); + return iox::ok(NodeName { handle }); } return iox::err(iox::into(ret_val)); diff --git a/iceoryx2-ffi/cxx/tests/src/node_state_tests.cpp b/iceoryx2-ffi/cxx/tests/src/node_state_tests.cpp index a19cca031..df8e83341 100644 --- a/iceoryx2-ffi/cxx/tests/src/node_state_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/node_state_tests.cpp @@ -23,7 +23,7 @@ class NodeStateTest : public ::testing::Test { static constexpr ServiceType TYPE = T::TYPE; }; -TYPED_TEST_SUITE(NodeStateTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(NodeStateTest, iox2_testing::ServiceTypes, ); TYPED_TEST(NodeStateTest, alive_node_works) { constexpr ServiceType SERVICE_TYPE = TestFixture::TYPE; diff --git a/iceoryx2-ffi/cxx/tests/src/node_tests.cpp b/iceoryx2-ffi/cxx/tests/src/node_tests.cpp index ee2c1b380..31b4dfcc5 100644 --- a/iceoryx2-ffi/cxx/tests/src/node_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/node_tests.cpp @@ -26,7 +26,7 @@ class NodeTest : public ::testing::Test { static constexpr ServiceType TYPE = T::TYPE; }; -TYPED_TEST_SUITE(NodeTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(NodeTest, iox2_testing::ServiceTypes, ); TYPED_TEST(NodeTest, node_name_is_applied) { constexpr ServiceType SERVICE_TYPE = TestFixture::TYPE; diff --git a/iceoryx2-ffi/cxx/tests/src/service_event_tests.cpp b/iceoryx2-ffi/cxx/tests/src/service_event_tests.cpp index 0b61cf0f0..5d364e739 100644 --- a/iceoryx2-ffi/cxx/tests/src/service_event_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/service_event_tests.cpp @@ -51,7 +51,7 @@ struct ServiceEventTest : public ::testing::Test { template std::atomic ServiceEventTest::event_id_counter { 0 }; -TYPED_TEST_SUITE(ServiceEventTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(ServiceEventTest, iox2_testing::ServiceTypes, ); TYPED_TEST(ServiceEventTest, created_service_does_exist) { constexpr ServiceType SERVICE_TYPE = TestFixture::TYPE; diff --git a/iceoryx2-ffi/cxx/tests/src/service_publish_subscribe_tests.cpp b/iceoryx2-ffi/cxx/tests/src/service_publish_subscribe_tests.cpp index 092e16dea..a4ce6247d 100644 --- a/iceoryx2-ffi/cxx/tests/src/service_publish_subscribe_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/service_publish_subscribe_tests.cpp @@ -31,7 +31,7 @@ class ServicePublishSubscribeTest : public ::testing::Test { static constexpr ServiceType TYPE = T::TYPE; }; -TYPED_TEST_SUITE(ServicePublishSubscribeTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(ServicePublishSubscribeTest, iox2_testing::ServiceTypes, ); TYPED_TEST(ServicePublishSubscribeTest, created_service_does_exist) { constexpr ServiceType SERVICE_TYPE = TestFixture::TYPE; diff --git a/iceoryx2-ffi/cxx/tests/src/unique_port_id_tests.cpp b/iceoryx2-ffi/cxx/tests/src/unique_port_id_tests.cpp index 8a318d8ff..aca298736 100644 --- a/iceoryx2-ffi/cxx/tests/src/unique_port_id_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/unique_port_id_tests.cpp @@ -63,7 +63,7 @@ struct UniquePortIdTest : public ::testing::Test { // NOLINTEND(misc-non-private-member-variables-in-classes) }; -TYPED_TEST_SUITE(UniquePortIdTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(UniquePortIdTest, iox2_testing::ServiceTypes, ); TYPED_TEST(UniquePortIdTest, unique_port_id_value) { auto null_id = iox::vector { iox2::UNIQUE_PORT_ID_LENGTH, 0 }; diff --git a/iceoryx2-ffi/cxx/tests/src/waitset_tests.cpp b/iceoryx2-ffi/cxx/tests/src/waitset_tests.cpp index 1014e7abb..2bd024426 100644 --- a/iceoryx2-ffi/cxx/tests/src/waitset_tests.cpp +++ b/iceoryx2-ffi/cxx/tests/src/waitset_tests.cpp @@ -58,7 +58,7 @@ struct WaitSetTest : public ::testing::Test { // NOLINTEND(misc-non-private-member-variables-in-classes) }; -TYPED_TEST_SUITE(WaitSetTest, iox2_testing::ServiceTypes); +TYPED_TEST_SUITE(WaitSetTest, iox2_testing::ServiceTypes, ); TYPED_TEST(WaitSetTest, newly_created_waitset_is_empty) { auto sut = this->create_sut();