Skip to content

Commit

Permalink
Suppress false positive warnings from gcc. (#811)
Browse files Browse the repository at this point in the history
This is one of the last warnings that is preventing us
from getting to yellow in release builds.

Signed-off-by: Chris Lalancette <[email protected]>
(cherry picked from commit ec7745e)
  • Loading branch information
clalancette authored and mergify[bot] committed Sep 25, 2024
1 parent b848d6c commit fd6634c
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,29 @@
#include "rosidl_typesupport_introspection_tests/msg/constants.hpp"
#include "rosidl_typesupport_introspection_tests/msg/defaults.hpp"
#include "rosidl_typesupport_introspection_tests/msg/empty.hpp"
#include "rosidl_typesupport_introspection_tests/msg/multi_nested.hpp"
#include "rosidl_typesupport_introspection_tests/msg/nested.hpp"
#include "rosidl_typesupport_introspection_tests/msg/strings.hpp"
#include "rosidl_typesupport_introspection_tests/msg/w_strings.hpp"
#include "rosidl_typesupport_introspection_tests/msg/unbounded_sequences.hpp"
#include "rosidl_typesupport_introspection_tests/srv/arrays.hpp"
#include "rosidl_typesupport_introspection_tests/srv/basic_types.hpp"
#include "rosidl_typesupport_introspection_tests/srv/empty.hpp"

// GCC 13 has false positive warnings around stringop-overflow and array-bounds.
// Suppress them until this is fixed in upstream gcc. See
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114758 for more details.
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif

#include "rosidl_typesupport_introspection_tests/msg/multi_nested.hpp"
#include "rosidl_typesupport_introspection_tests/msg/unbounded_sequences.hpp"

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

#include "rosidl_typesupport_introspection_tests/fixtures.hpp"
#include "rosidl_typesupport_introspection_tests/helpers.hpp"
#include "rosidl_typesupport_introspection_tests/libraries.hpp"
Expand Down

0 comments on commit fd6634c

Please sign in to comment.