Skip to content

Commit 2a3b96f

Browse files
committed
iox-eclipse-iceoryx#1196 Fix C binding warnings
Signed-off-by: Christian Eltzschig <[email protected]>
1 parent a78037f commit 2a3b96f

21 files changed

+24
-27
lines changed

iceoryx_binding_c/include/iceoryx_binding_c/runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ uint64_t iox_runtime_get_instance_name(char* const name, const uint64_t nameLeng
3535

3636
/// @brief initiates the shutdown of the runtime to unblock all potentially blocking producer
3737
/// with the iox_ConsumerTooSlowPolicy::ConsumerTooSlowPolicy_WAIT_FOR_CONSUMER option set
38-
void iox_runtime_shutdown();
38+
void iox_runtime_shutdown(void);
3939

4040
#endif

iceoryx_examples/callbacks_in_c/ice_c_callbacks_publisher.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void sigHandler(int f_sig)
3232
killswitch = true;
3333
}
3434

35-
void sending()
35+
void sending(void)
3636
{
3737
iox_runtime_init("iox-c-callbacks-publisher");
3838

@@ -75,7 +75,7 @@ void sending()
7575
}
7676
}
7777

78-
int main()
78+
int main(void)
7979
{
8080
signal(SIGINT, sigHandler);
8181
signal(SIGTERM, sigHandler);

iceoryx_examples/callbacks_in_c/ice_c_callbacks_subscriber.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void onSampleReceivedCallback(iox_sub_t subscriber)
109109
}
110110
//! [subscriber callback]
111111

112-
int main()
112+
int main(void)
113113
{
114114
signal(SIGINT, sigHandler);
115115
signal(SIGTERM, sigHandler);

iceoryx_examples/callbacks_in_c/ice_c_callbacks_with_context_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void onSampleReceivedCallback(iox_sub_t subscriber, void* contextData)
9696
}
9797
//! [subscriber callback]
9898

99-
int main()
99+
int main(void)
100100
{
101101
signal(SIGINT, sigHandler);
102102
signal(SIGTERM, sigHandler);

iceoryx_examples/icedelivery_in_c/ice_c_publisher.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void sigHandler(int signalValue)
3434
killswitch = true;
3535
}
3636

37-
void sending()
37+
void sending(void)
3838
{
3939
//! [create runtime instance]
4040
const char APP_NAME[] = "iox-c-publisher";
@@ -85,7 +85,7 @@ void sending()
8585
//! [cleanup]
8686
}
8787

88-
int main()
88+
int main(void)
8989
{
9090
signal(SIGINT, sigHandler);
9191
signal(SIGTERM, sigHandler);

iceoryx_examples/icedelivery_in_c/ice_c_subscriber.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void sigHandler(int signalValue)
3535
killswitch = true;
3636
}
3737

38-
void receiving()
38+
void receiving(void)
3939
{
4040
//! [create runtime instance]
4141
const char APP_NAME[] = "iox-c-subscriber";
@@ -87,7 +87,7 @@ void receiving()
8787
//! [cleanup]
8888
}
8989

90-
int main()
90+
int main(void)
9191
{
9292
signal(SIGINT, sigHandler);
9393
signal(SIGTERM, sigHandler);

iceoryx_examples/icediscovery_in_c/iox_c_find_service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void searchFrontDevices(const iox_service_description_t service, void* count)
5858
}
5959
//! [search function for all front devices]
6060

61-
int main()
61+
int main(void)
6262
{
6363
signal(SIGINT, sigHandler);
6464
signal(SIGTERM, sigHandler);

iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void sigHandler(int signalValue)
3535
keepRunning = false;
3636
}
3737

38-
int main()
38+
int main(void)
3939
{
4040
signal(SIGINT, sigHandler);
4141
signal(SIGTERM, sigHandler);

iceoryx_examples/request_response_in_c/client_c_basic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void sigHandler(int signalValue)
3535
keepRunning = false;
3636
}
3737

38-
int main()
38+
int main(void)
3939
{
4040
//! [register signal handler and init runtime]
4141
signal(SIGINT, sigHandler);

iceoryx_examples/request_response_in_c/client_c_waitset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void sigHandler(int signalValue)
4747
iox_ws_mark_for_destruction(waitset);
4848
}
4949

50-
int main()
50+
int main(void)
5151
{
5252
signal(SIGINT, sigHandler);
5353
signal(SIGTERM, sigHandler);

iceoryx_examples/request_response_in_c/server_c_basic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void sigHandler(int signalValue)
3535
keepRunning = false;
3636
}
3737

38-
int main()
38+
int main(void)
3939
{
4040
//! [register signal handler and init runtime]
4141
signal(SIGINT, sigHandler);

iceoryx_examples/request_response_in_c/server_c_listener.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void onRequestReceived(iox_server_t server)
6666
}
6767
//! [process request]
6868

69-
int main()
69+
int main(void)
7070
{
7171
signal(SIGINT, sigHandler);
7272
signal(SIGTERM, sigHandler);

iceoryx_examples/user_header/publisher_c_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static void sigHandler(int signalValue)
4646
}
4747
//! [signal handling]
4848

49-
int main()
49+
int main(void)
5050
{
5151
//! [register sigHandler]
5252
signal(SIGINT, sigHandler);

iceoryx_examples/user_header/subscriber_c_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void sigHandler(int signalValue)
4444
}
4545
//! [signal handling]
4646

47-
int main()
47+
int main(void)
4848
{
4949
//! [register sigHandler]
5050
signal(SIGINT, sigHandler);

iceoryx_examples/waitset_in_c/ice_c_waitset_gateway.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void subscriberCallback(iox_sub_t const subscriber, void* const contextData)
7676
}
7777
//! [subscriber callback]
7878

79-
int main()
79+
int main(void)
8080
{
8181
//! [initialization and shutdown handling]
8282
iox_runtime_init("iox-c-waitset-gateway");

iceoryx_examples/waitset_in_c/ice_c_waitset_grouping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void sigHandler(int signalValue)
4242
iox_user_trigger_trigger(shutdownTrigger);
4343
}
4444

45-
int main()
45+
int main(void)
4646
{
4747
//! [initialization and shutdown handling]
4848
iox_runtime_init("iox-c-waitset-grouping");

iceoryx_examples/waitset_in_c/ice_c_waitset_individual.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void sigHandler(int signalValue)
4242
iox_user_trigger_trigger(shutdownTrigger);
4343
}
4444

45-
int main()
45+
int main(void)
4646
{
4747
//! [initialization and shutdown handling]
4848
iox_runtime_init("iox-c-waitset-individual");

iceoryx_examples/waitset_in_c/ice_c_waitset_publisher.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void sigHandler(int signalValue)
3434
killswitch = true;
3535
}
3636

37-
void sending()
37+
void sending(void)
3838
{
3939
iox_runtime_init("iox-c-waitset-publisher");
4040

@@ -69,7 +69,7 @@ void sending()
6969
iox_pub_deinit(publisher);
7070
}
7171

72-
int main()
72+
int main(void)
7373
{
7474
signal(SIGINT, sigHandler);
7575
signal(SIGTERM, sigHandler);

iceoryx_examples/waitset_in_c/ice_c_waitset_timer_driven_execution.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void joinThread(pthread_t threadHandle)
9090
#endif
9191
}
9292

93-
int main()
93+
int main(void)
9494
{
9595
//! [initialization and shutdown handling]
9696
iox_runtime_init("iox-c-waitset-timer-driven-execution");

iceoryx_hoofs/test/moduletests/test_cxx_type_traits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ using namespace iox::cxx;
4747
TEST(TypeTraitsTest, IsInvocableResolvesToTrue)
4848
{
4949
::testing::Test::RecordProperty("TEST_ID", "802f0044-ee40-47b7-9b83-519866c63508");
50-
auto lambda = [](int foo) -> void { foo++; };
50+
auto lambda = [](int) -> void {};
5151
auto sut = is_invocable<decltype(lambda), int>::value;
5252
EXPECT_TRUE(sut);
5353
}

iceoryx_posh/source/gateway/toml_gateway_config_parser.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,8 @@ iox::config::TomlGatewayConfigParser::validate(const cpptoml::table& parsedToml)
102102
TomlGatewayConfigParseError::MAXIMUM_NUMBER_OF_ENTRIES_EXCEEDED);
103103
}
104104

105-
uint8_t count = 0;
106105
for (const auto& service : *serviceArray)
107106
{
108-
++count;
109-
110107
auto serviceName = service->get_as<std::string>(GATEWAY_CONFIG_SERVICE_NAME);
111108
auto instance = service->get_as<std::string>(GATEWAY_CONFIG_SERVICE_INSTANCE_NAME);
112109
auto event = service->get_as<std::string>(GATEWAY_CONFIG_SERVICE_EVENT_NAME);

0 commit comments

Comments
 (0)