From d40ee756d59a3b0b234616081a9ad82cdf2e1aeb Mon Sep 17 00:00:00 2001 From: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Date: Fri, 3 Dec 2021 12:22:40 -0800 Subject: [PATCH] Add parentheses suggested by Clang on OSX to fix build warning (#930) Signed-off-by: Emerson Knapp --- rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp b/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp index 9a139ad3fb..2ef591131d 100644 --- a/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp +++ b/rosbag2_transport/src/rosbag2_transport/bag_rewrite.cpp @@ -149,7 +149,7 @@ void perform_rewrite( next_messages.resize(input_bags.size(), nullptr); std::shared_ptr next_msg; - while (next_msg = get_next(input_bags, next_messages)) { + while ((next_msg = get_next(input_bags, next_messages))) { auto topic_writers = topic_outputs.find(next_msg->topic_name); if (topic_writers != topic_outputs.end()) { for (auto writer : topic_writers->second) {