Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tier4_autoware_utils): fix -Werror=unused-parameter #6764

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Apr 9, 2024

Description

Related PR: #6702

Fix following build error.

--- stderr: obstacle_cruise_planner                                                                                                                                                                                                                                                                                                                                                                                             
In file included from /home/satoshi/pilot-auto/src/autoware/universe/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/node.hpp:24,                                                                                                                                                                                                                                                                              
                 from /home/satoshi/pilot-auto/src/autoware/universe/planning/obstacle_cruise_planner/src/node.cpp:15:                                                                                                                                                                                                                                                                                                          
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp: In instantiation of ‘tier4_autoware_utils::InterProcessPollingSubscriber<T>::InterProcessPollingSubscriber(rclcpp::Node*, const string&) [with T = nav_msgs::msg::Odometry_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>]’:                                                            
/home/satoshi/pilot-auto/src/autoware/universe/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/node.hpp:143:29:   required from here                                                                                                                                                                                                                                                                           
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp:41:75: error: unused parameter ‘msg’ [-Werror=unused-parameter]                                                                                                                                                                                                                                                   
   41 |       topic_name, rclcpp::QoS{1}, [node](const typename T::ConstSharedPtr msg) { assert(false); },                                                                                                                                                                                                                                                                                                                      
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~                                                                                                                                                                                                                                                                                                                                           
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp: In instantiation of ‘tier4_autoware_utils::InterProcessPollingSubscriber<T>::InterProcessPollingSubscriber(rclcpp::Node*, const string&) [with T = autoware_auto_perception_msgs::msg::PredictedObjects_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>]’:                               
/home/satoshi/pilot-auto/src/autoware/universe/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/node.hpp:145:28:   required from here                                                                                                                                                                                                                                                                           
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp:41:75: error: unused parameter ‘msg’ [-Werror=unused-parameter]                                                                                                                                                                                                                                                   
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp: In instantiation of ‘tier4_autoware_utils::InterProcessPollingSubscriber<T>::InterProcessPollingSubscriber(rclcpp::Node*, const string&) [with T = geometry_msgs::msg::AccelWithCovarianceStamped_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>]’:                                     
/home/satoshi/pilot-auto/src/autoware/universe/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/node.hpp:147:33:   required from here                                                                                                                                                                                                                                                                           
/home/satoshi/pilot-auto/install/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp:41:75: error: unused parameter ‘msg’ [-Werror=unused-parameter]                                                                                                                                                                                                                                                   
cc1plus: all warnings being treated as errors                                                                                                                                                                                                                                                                                                                                                                                   
gmake[2]: *** [CMakeFiles/obstacle_cruise_planner_core.dir/build.make:76: CMakeFiles/obstacle_cruise_planner_core.dir/src/node.cpp.o] Error 1                                                                                                                                                                                                                                                                                   
gmake[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/obstacle_cruise_planner_core.dir/all] Error 2                                                                                                                                                                                                                                                                                                                               
gmake: *** [Makefile:146: all] Error 2                                                                                                                                                                                                                                                                                                                                                                                          
---                                                                                                                                                                                                                                                                                                                                                                                                                             
Failed   <<< obstacle_cruise_planner [1min 0s, exited with code 2]

Tests performed

Pass build.

Effects on system behavior

Nothing.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Apr 9, 2024
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Apr 9, 2024
@satoshi-ota satoshi-ota enabled auto-merge (squash) April 9, 2024 00:16
@satoshi-ota satoshi-ota merged commit d682442 into autowarefoundation:main Apr 9, 2024
41 of 43 checks passed
@satoshi-ota satoshi-ota deleted the fix/unused-parameter branch April 9, 2024 03:21
esteve pushed a commit that referenced this pull request Apr 9, 2024
fix(tier4_autoware_utils): fix -Werror=unused-parameter

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request May 2, 2024
…undation#6764)

fix(tier4_autoware_utils): fix -Werror=unused-parameter

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…undation#6764)

fix(tier4_autoware_utils): fix -Werror=unused-parameter

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants