From a7955d891bcee5ad3f8acecc6ea3bdb1ddc73ce9 Mon Sep 17 00:00:00 2001 From: easylyou <38713965+easylyou@users.noreply.github.com> Date: Thu, 5 Aug 2021 01:30:53 +0800 Subject: [PATCH] fix: bug of passing string to printf (#2490) --- nav2_map_server/test/component/test_map_saver_publisher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav2_map_server/test/component/test_map_saver_publisher.cpp b/nav2_map_server/test/component/test_map_saver_publisher.cpp index 50d66b0a5e..c08107f72f 100644 --- a/nav2_map_server/test/component/test_map_saver_publisher.cpp +++ b/nav2_map_server/test/component/test_map_saver_publisher.cpp @@ -36,7 +36,7 @@ class TestPublisher : public rclcpp::Node std::string pub_map_file = path(TEST_DIR) / path(g_valid_yaml_file); LOAD_MAP_STATUS status = loadMapFromYaml(pub_map_file, msg_); if (status != LOAD_MAP_SUCCESS) { - RCLCPP_ERROR(get_logger(), "Can not load %s map file", pub_map_file); + RCLCPP_ERROR(get_logger(), "Can not load %s map file", pub_map_file.c_str()); return; }