diff --git a/doc/website/release-notes/iceoryx-v2-0-6.md b/doc/website/release-notes/iceoryx-v2-0-6.md index f0a1be7739..a8cb0c4da8 100644 --- a/doc/website/release-notes/iceoryx-v2-0-6.md +++ b/doc/website/release-notes/iceoryx-v2-0-6.md @@ -9,3 +9,4 @@ - Patch cpptoml to use cmake 3.16 [#2011](https://github.com/eclipse-iceoryx/iceoryx/issues/2011) - Update github actions [#2011](https://github.com/eclipse-iceoryx/iceoryx/issues/2011) - Remove warning in toml gateway config parser [#2266](https://github.com/eclipse-iceoryx/iceoryx/issues/2266) +- Fix warnings on macOS [#2284](https://github.com/eclipse-iceoryx/iceoryx/issues/2266) diff --git a/iceoryx_binding_c/include/iceoryx_binding_c/runtime.h b/iceoryx_binding_c/include/iceoryx_binding_c/runtime.h index c667c4b13b..2774d447ad 100644 --- a/iceoryx_binding_c/include/iceoryx_binding_c/runtime.h +++ b/iceoryx_binding_c/include/iceoryx_binding_c/runtime.h @@ -35,6 +35,6 @@ uint64_t iox_runtime_get_instance_name(char* const name, const uint64_t nameLeng /// @brief initiates the shutdown of the runtime to unblock all potentially blocking producer /// with the iox_ConsumerTooSlowPolicy::ConsumerTooSlowPolicy_WAIT_FOR_CONSUMER option set -void iox_runtime_shutdown(); +void iox_runtime_shutdown(void); #endif diff --git a/iceoryx_dds/source/gateway/main.cpp b/iceoryx_dds/source/gateway/main.cpp index a085cf52d0..8ae51171aa 100644 --- a/iceoryx_dds/source/gateway/main.cpp +++ b/iceoryx_dds/source/gateway/main.cpp @@ -30,10 +30,8 @@ class ShutdownManager { public: - static void scheduleShutdown(int num) + static void scheduleShutdown(int) { - char reason; - psignal(num, &reason); s_semaphore.post().or_else([](auto) { std::cerr << "failed to call post on shutdown semaphore" << std::endl; std::terminate(); diff --git a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c index a955ae6a60..7c7e3080ad 100644 --- a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c +++ b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c @@ -32,7 +32,7 @@ static void sigHandler(int f_sig) killswitch = true; } -void sending() +void sending(void) { iox_runtime_init("iox-c-callbacks-publisher"); @@ -75,7 +75,7 @@ void sending() } } -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_subscriber.c b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_subscriber.c index 533f26247c..16112ddcf1 100644 --- a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_subscriber.c +++ b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_subscriber.c @@ -109,7 +109,7 @@ void onSampleReceivedCallback(iox_sub_t subscriber) } //! [subscriber callback] -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_with_context_data.c b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_with_context_data.c index a37d312932..0ba83b09a8 100644 --- a/iceoryx_examples/callbacks_in_c/ice_c_callbacks_with_context_data.c +++ b/iceoryx_examples/callbacks_in_c/ice_c_callbacks_with_context_data.c @@ -96,7 +96,7 @@ void onSampleReceivedCallback(iox_sub_t subscriber, void* contextData) } //! [subscriber callback] -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/icedelivery_in_c/ice_c_publisher.c b/iceoryx_examples/icedelivery_in_c/ice_c_publisher.c index 345afbd5aa..b292482085 100644 --- a/iceoryx_examples/icedelivery_in_c/ice_c_publisher.c +++ b/iceoryx_examples/icedelivery_in_c/ice_c_publisher.c @@ -34,7 +34,7 @@ static void sigHandler(int signalValue) killswitch = true; } -void sending() +void sending(void) { //! [create runtime instance] const char APP_NAME[] = "iox-c-publisher"; @@ -85,7 +85,7 @@ void sending() //! [cleanup] } -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c b/iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c index f233495758..190a7f07a7 100644 --- a/iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c +++ b/iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c @@ -35,7 +35,7 @@ static void sigHandler(int signalValue) killswitch = true; } -void receiving() +void receiving(void) { //! [create runtime instance] const char APP_NAME[] = "iox-c-subscriber"; @@ -87,7 +87,7 @@ void receiving() //! [cleanup] } -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/icediscovery_in_c/iox_c_find_service.c b/iceoryx_examples/icediscovery_in_c/iox_c_find_service.c index d58b7d7103..36b4d1406f 100644 --- a/iceoryx_examples/icediscovery_in_c/iox_c_find_service.c +++ b/iceoryx_examples/icediscovery_in_c/iox_c_find_service.c @@ -58,7 +58,7 @@ void searchFrontDevices(const iox_service_description_t service, void* count) } //! [search function for all front devices] -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c b/iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c index dfb79feedb..73e21c6aca 100644 --- a/iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c +++ b/iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c @@ -35,7 +35,7 @@ static void sigHandler(int signalValue) keepRunning = false; } -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/request_response_in_c/client_c_basic.c b/iceoryx_examples/request_response_in_c/client_c_basic.c index c5bb040df6..25fb6e0f06 100644 --- a/iceoryx_examples/request_response_in_c/client_c_basic.c +++ b/iceoryx_examples/request_response_in_c/client_c_basic.c @@ -35,7 +35,7 @@ void sigHandler(int signalValue) keepRunning = false; } -int main() +int main(void) { //! [register signal handler and init runtime] signal(SIGINT, sigHandler); diff --git a/iceoryx_examples/request_response_in_c/client_c_waitset.c b/iceoryx_examples/request_response_in_c/client_c_waitset.c index 9095d3ec3e..5c4895253b 100644 --- a/iceoryx_examples/request_response_in_c/client_c_waitset.c +++ b/iceoryx_examples/request_response_in_c/client_c_waitset.c @@ -38,7 +38,7 @@ void sigHandler(int signalValue) keepRunning = false; } -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_examples/request_response_in_c/server_c_basic.c b/iceoryx_examples/request_response_in_c/server_c_basic.c index 7a614b8510..7ff2fe30f2 100644 --- a/iceoryx_examples/request_response_in_c/server_c_basic.c +++ b/iceoryx_examples/request_response_in_c/server_c_basic.c @@ -35,7 +35,7 @@ void sigHandler(int signalValue) keepRunning = false; } -int main() +int main(void) { //! [register signal handler and init runtime] signal(SIGINT, sigHandler); diff --git a/iceoryx_examples/request_response_in_c/server_c_listener.c b/iceoryx_examples/request_response_in_c/server_c_listener.c index 4937d689ed..7bf482435b 100644 --- a/iceoryx_examples/request_response_in_c/server_c_listener.c +++ b/iceoryx_examples/request_response_in_c/server_c_listener.c @@ -66,7 +66,7 @@ void onRequestReceived(iox_server_t server) } //! [process request] -int main() +int main(void) { signal(SIGINT, sigHandler); signal(SIGTERM, sigHandler); diff --git a/iceoryx_hoofs/platform/mac/include/iceoryx_hoofs/platform/signal.hpp b/iceoryx_hoofs/platform/mac/include/iceoryx_hoofs/platform/signal.hpp index e0b0f5edf2..edcc9ede05 100644 --- a/iceoryx_hoofs/platform/mac/include/iceoryx_hoofs/platform/signal.hpp +++ b/iceoryx_hoofs/platform/mac/include/iceoryx_hoofs/platform/signal.hpp @@ -19,9 +19,4 @@ #include -inline void psignal(int sig, const char* s) -{ - psignal(static_cast(sig), s); -} - #endif // IOX_HOOFS_MAC_PLATFORM_SIGNAL_HPP diff --git a/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp b/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp index 9b1f5a0e8c..91453c6dd1 100644 --- a/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp +++ b/iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp @@ -46,7 +46,7 @@ using namespace iox::cxx; TEST(TypeTraitsTest, IsInvocableResolvesToTrue) { ::testing::Test::RecordProperty("TEST_ID", "802f0044-ee40-47b7-9b83-519866c63508"); - auto lambda = [](int foo) -> void { foo++; }; + auto lambda = [](int) -> void {}; auto sut = is_invocable::value; EXPECT_TRUE(sut); }