From 609aae140c2478c7a5c9c2ddac8f971073476b64 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 1 May 2024 01:40:22 +1000 Subject: [PATCH] Ignore warnings in included xtensor library (#4285) Signed-off-by: James Ward --- .../include/nav2_mppi_controller/critic_data.hpp | 6 ++++++ .../include/nav2_mppi_controller/critic_manager.hpp | 6 ++++++ .../nav2_mppi_controller/models/control_sequence.hpp | 5 +++++ .../include/nav2_mppi_controller/models/path.hpp | 5 +++++ .../include/nav2_mppi_controller/models/state.hpp | 5 +++++ .../include/nav2_mppi_controller/models/trajectories.hpp | 5 +++++ .../include/nav2_mppi_controller/motion_models.hpp | 6 ++++++ .../include/nav2_mppi_controller/optimizer.hpp | 5 +++++ .../include/nav2_mppi_controller/tools/noise_generator.hpp | 5 +++++ .../nav2_mppi_controller/tools/trajectory_visualizer.hpp | 6 ++++++ .../include/nav2_mppi_controller/tools/utils.hpp | 5 +++++ 11 files changed, 59 insertions(+) diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/critic_data.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/critic_data.hpp index 31965eb1cf..05adb41791 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/critic_data.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/critic_data.hpp @@ -17,7 +17,13 @@ #include #include + +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop #include "geometry_msgs/msg/pose_stamped.hpp" #include "nav2_core/goal_checker.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/critic_manager.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/critic_manager.hpp index 2de3e72a29..7e09fcf91c 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/critic_manager.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/critic_manager.hpp @@ -19,7 +19,13 @@ #include #include #include + +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop #include "geometry_msgs/msg/twist.hpp" #include "geometry_msgs/msg/twist_stamped.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/models/control_sequence.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/models/control_sequence.hpp index 7a96ad1c94..ad797e9afa 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/models/control_sequence.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/models/control_sequence.hpp @@ -15,7 +15,12 @@ #ifndef NAV2_MPPI_CONTROLLER__MODELS__CONTROL_SEQUENCE_HPP_ #define NAV2_MPPI_CONTROLLER__MODELS__CONTROL_SEQUENCE_HPP_ +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop namespace mppi::models { diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/models/path.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/models/path.hpp index 241a6928ba..f1bab3f803 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/models/path.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/models/path.hpp @@ -15,7 +15,12 @@ #ifndef NAV2_MPPI_CONTROLLER__MODELS__PATH_HPP_ #define NAV2_MPPI_CONTROLLER__MODELS__PATH_HPP_ +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop namespace mppi::models { diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/models/state.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/models/state.hpp index 7dd19eaff3..75f8c7521a 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/models/state.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/models/state.hpp @@ -15,7 +15,12 @@ #ifndef NAV2_MPPI_CONTROLLER__MODELS__STATE_HPP_ #define NAV2_MPPI_CONTROLLER__MODELS__STATE_HPP_ +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop #include #include diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/models/trajectories.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/models/trajectories.hpp index fa2c018120..0862c2caed 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/models/trajectories.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/models/trajectories.hpp @@ -15,8 +15,13 @@ #ifndef NAV2_MPPI_CONTROLLER__MODELS__TRAJECTORIES_HPP_ #define NAV2_MPPI_CONTROLLER__MODELS__TRAJECTORIES_HPP_ +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include #include +#pragma GCC diagnostic pop namespace mppi::models { diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp index 1132953bd9..713c3d2a22 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp @@ -19,10 +19,16 @@ #include "nav2_mppi_controller/models/control_sequence.hpp" #include "nav2_mppi_controller/models/state.hpp" + +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include #include #include #include +#pragma GCC diagnostic pop #include "nav2_mppi_controller/tools/parameters_handler.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/optimizer.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/optimizer.hpp index 061654aa65..6e1c271d94 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/optimizer.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/optimizer.hpp @@ -18,8 +18,13 @@ #include #include +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include #include +#pragma GCC diagnostic pop #include "rclcpp_lifecycle/lifecycle_node.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/tools/noise_generator.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/tools/noise_generator.hpp index a811d998e4..f16bb90953 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/tools/noise_generator.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/tools/noise_generator.hpp @@ -21,8 +21,13 @@ #include #include +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include #include +#pragma GCC diagnostic pop #include "nav2_mppi_controller/models/optimizer_settings.hpp" #include "nav2_mppi_controller/tools/parameters_handler.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/tools/trajectory_visualizer.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/tools/trajectory_visualizer.hpp index 6ecdbdcb8d..d9cdc95ce9 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/tools/trajectory_visualizer.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/tools/trajectory_visualizer.hpp @@ -17,7 +17,13 @@ #include #include + +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include +#pragma GCC diagnostic pop #include "nav_msgs/msg/path.hpp" #include "rclcpp/rclcpp.hpp" diff --git a/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp b/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp index 4de5a1cf06..91d9f73b75 100644 --- a/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp +++ b/nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp @@ -23,10 +23,15 @@ #include #include +// xtensor creates warnings that needs to be ignored as we are building with -Werror +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" #include #include #include #include +#pragma GCC diagnostic pop #include "angles/angles.h"