Skip to content

Commit 2b9b6eb

Browse files
committed
Fix warnings
1 parent 85b7da9 commit 2b9b6eb

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

rclc/complex_msg_publisher/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Continuing.\n",__LINE__,(int)temp_rc);}}
1313

1414

15-
void main(void)
15+
int main()
1616
{
1717
rcl_allocator_t allocator = rcl_get_default_allocator();
1818
rclc_support_t support;

rclc/configuration_example/configured_publisher/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
2525
}
2626
}
2727

28-
void main(int argc, char * const argv[])
28+
int main(int argc, char * const argv[])
2929
{
3030
rcl_allocator_t allocator = rcl_get_default_allocator();
3131
rclc_support_t support;

rclc/configuration_example/configured_subscriber/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void subscription_callback(const void * msgin)
2121
printf("Received: %d\n", msg->data);
2222
}
2323

24-
void main(int argc, const char * const * argv)
24+
int main(int argc, const char * const * argv)
2525
{
2626
rcl_allocator_t allocator = rcl_get_default_allocator();
2727
rclc_support_t support;

rclc/int32_publisher/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
2424
}
2525
}
2626

27-
void main(void)
27+
int main()
2828
{
2929
rcl_allocator_t allocator = rcl_get_default_allocator();
3030
rclc_support_t support;

rclc/int32_subscriber/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void subscription_callback(const void * msgin)
1919
printf("Received: %d\n", msg->data);
2020
}
2121

22-
void main()
22+
int main()
2323
{
2424
rcl_allocator_t allocator = rcl_get_default_allocator();
2525
rclc_support_t support;

rclc/ping_pong/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void pong_subscription_callback(const void * msgin)
7373
}
7474

7575

76-
void main()
76+
int main()
7777
{
7878
rcl_allocator_t allocator = rcl_get_default_allocator();
7979
rclc_support_t support;

rclc/timer/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
1313
{
1414
if (timer != NULL) {
15-
printf("Timer callback executed. Last time %d\n", last_call_time);
15+
printf("Timer callback executed. Last time %ld\n", last_call_time);
1616
}
1717
}
1818

19-
void main(void)
19+
int main()
2020
{
2121
rcl_allocator_t allocator = rcl_get_default_allocator();
2222
rclc_support_t support;

0 commit comments

Comments
 (0)