Skip to content

Commit

Permalink
Fix logging warnings in rclcpp
Browse files Browse the repository at this point in the history
Signed-off-by: Audrow Nash <audrow.nash@gmail.com>
  • Loading branch information
audrow committed Nov 10, 2020
1 parent c16c633 commit e4849af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rclcpp/src/rclcpp/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ get_node_logger(const rcl_node_t * node)
const char * logger_name = rcl_node_get_logger_name(node);
if (nullptr == logger_name) {
auto logger = rclcpp::get_logger("rclcpp");
RCLCPP_ERROR(logger, "failed to get logger name from node at address %p", node);
RCLCPP_ERROR(logger, "failed to get logger name from node at address %p",
static_cast<void*>(const_cast<rcl_node_t*>(node)));
return logger;
}
return rclcpp::get_logger(logger_name);
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/signal_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ SignalHandler::deferred_signal_handler()
get_logger(),
"deferred_signal_handler(): "
"shutting down rclcpp::Context @ %p, because it had shutdown_on_sigint == true",
context_ptr.get());
static_cast<void*>(context_ptr.get()));
context_ptr->shutdown("signal handler");
}
}
Expand Down

0 comments on commit e4849af

Please sign in to comment.