Skip to content

Commit

Permalink
iox-#2284 Fix warnings on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Apr 25, 2024
1 parent 661eee5 commit da15631
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 24 deletions.
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-v2-0-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion iceoryx_binding_c/include/iceoryx_binding_c/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions iceoryx_dds/source/gateway/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void sigHandler(int f_sig)
killswitch = true;
}

void sending()
void sending(void)
{
iox_runtime_init("iox-c-callbacks-publisher");

Expand Down Expand Up @@ -75,7 +75,7 @@ void sending()
}
}

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void onSampleReceivedCallback(iox_sub_t subscriber)
}
//! [subscriber callback]

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_examples/icedelivery_in_c/ice_c_publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -85,7 +85,7 @@ void sending()
//! [cleanup]
}

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -87,7 +87,7 @@ void receiving()
//! [cleanup]
}

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/icediscovery_in_c/iox_c_find_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void sigHandler(int signalValue)
keepRunning = false;
}

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/request_response_in_c/client_c_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void sigHandler(int signalValue)
keepRunning = false;
}

int main()
int main(void)
{
//! [register signal handler and init runtime]
signal(SIGINT, sigHandler);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/request_response_in_c/client_c_waitset.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void sigHandler(int signalValue)
keepRunning = false;
}

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/request_response_in_c/server_c_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void sigHandler(int signalValue)
keepRunning = false;
}

int main()
int main(void)
{
//! [register signal handler and init runtime]
signal(SIGINT, sigHandler);
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_examples/request_response_in_c/server_c_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void onRequestReceived(iox_server_t server)
}
//! [process request]

int main()
int main(void)
{
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,4 @@

#include <signal.h>

inline void psignal(int sig, const char* s)
{
psignal(static_cast<unsigned int>(sig), s);
}

#endif // IOX_HOOFS_MAC_PLATFORM_SIGNAL_HPP
2 changes: 1 addition & 1 deletion iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<decltype(lambda), int>::value;
EXPECT_TRUE(sut);
}
Expand Down

0 comments on commit da15631

Please sign in to comment.