Skip to content

Commit

Permalink
Make sure to check return value from external_initialize. (#65)
Browse files Browse the repository at this point in the history
Pointed out by clang static analysis as a dead store.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette committed Nov 11, 2020
1 parent 4a890bc commit 352b7a2
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ BENCHMARK_F(PerformanceTest, logging_reinitialize)(benchmark::State & st)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
rcl_logging_ret_t ret = rcl_logging_external_initialize(nullptr, allocator);
if (ret != RCL_LOGGING_RET_OK) {
st.SkipWithError(rcutils_get_error_string().str);
}

reset_heap_counters();

Expand Down

0 comments on commit 352b7a2

Please sign in to comment.