fix compiler warning in clang (#345)

* fix compiler warning in clang

Signed-off-by: William Woodall <william@osrfoundation.org>

* same thing but for node too

Signed-off-by: William Woodall <william@osrfoundation.org>
This commit is contained in:
William Woodall 2018-11-30 16:40:02 -06:00 committed by GitHub
parent 97ad0013e2
commit 1529b620cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}