Skip to content

Commit

Permalink
fix compiler warning in clang (#345)
Browse files Browse the repository at this point in the history
* fix compiler warning in clang

Signed-off-by: William Woodall <[email protected]>

* same thing but for node too

Signed-off-by: William Woodall <[email protected]>
  • Loading branch information
wjwwood authored Nov 30, 2018
1 parent 97ad001 commit 1529b62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion rcl/src/rcl/guard_condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ typedef struct rcl_guard_condition_impl_t
rcl_guard_condition_t
rcl_get_zero_initialized_guard_condition()
{
static rcl_guard_condition_t null_guard_condition = {0};
static rcl_guard_condition_t null_guard_condition = {
.context = 0,
.impl = 0
};
return null_guard_condition;
}

Expand Down
5 changes: 4 additions & 1 deletion rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ const char * rcl_get_secure_root(
rcl_node_t
rcl_get_zero_initialized_node()
{
static rcl_node_t null_node = {0};
static rcl_node_t null_node = {
.context = 0,
.impl = 0
};
return null_node;
}

Expand Down

0 comments on commit 1529b62

Please sign in to comment.