Skip to content

Commit

Permalink
Merge pull request ros2#38 from ros2/fix_cppcheck_warning
Browse files Browse the repository at this point in the history
fix unknownEvaluationOrder warning
  • Loading branch information
dirk-thomas committed Mar 31, 2016
2 parents 6a1ca6e + c7362e3 commit 1936e12
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rcl/src/rcl/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ rcl_timer_init(
if (now_ret != RCL_RET_OK) {
return now_ret; // rcl error state should already be set.
}
rcl_timer_impl_t impl = {
.callback = ATOMIC_VAR_INIT((uintptr_t)callback),
.period = ATOMIC_VAR_INIT(period),
.last_call_time = ATOMIC_VAR_INIT(now_steady),
.canceled = ATOMIC_VAR_INIT(false),
.allocator = allocator,
};
rcl_timer_impl_t impl;
impl.callback = ATOMIC_VAR_INIT((uintptr_t)callback);
impl.period = ATOMIC_VAR_INIT(period);
impl.last_call_time = ATOMIC_VAR_INIT(now_steady);
impl.canceled = ATOMIC_VAR_INIT(false);
impl.allocator = allocator;
RCL_CHECK_FOR_NULL_WITH_MSG(
allocator.allocate, "allocate not set", return RCL_RET_INVALID_ARGUMENT);
RCL_CHECK_FOR_NULL_WITH_MSG(
Expand Down

0 comments on commit 1936e12

Please sign in to comment.