From 356a9dec3c7d2cdca2816cbf48be2eaa5909263c Mon Sep 17 00:00:00 2001 From: r1 Date: Wed, 4 Aug 2021 19:17:27 +0800 Subject: [PATCH] fix: bug of passing string to printf --- 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; }