From c2143a16d37bd6cb600948b4acec404e46986d14 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:03:43 +0100
Subject: [PATCH 01/22] Ignore deprecation warnings in tests

---
 test/collision.cpp     | 18 ++++++++++++++++++
 test/serialization.cpp |  7 +++++++
 2 files changed, 25 insertions(+)

diff --git a/test/collision.cpp b/test/collision.cpp
index d672e95da..764489fea 100644
--- a/test/collision.cpp
+++ b/test/collision.cpp
@@ -43,7 +43,15 @@
 #include <fstream>
 #include <boost/assign/list_of.hpp>
 
+#include <hpp/fcl/fwd.hh>
+
+HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+
 #include <hpp/fcl/collision.h>
+
+HPP_FCL_COMPILER_DIAGNOSTIC_POP
+
 #include <hpp/fcl/BV/BV.h>
 #include <hpp/fcl/shape/geometric_shapes.h>
 #include <hpp/fcl/narrowphase/narrowphase.h>
@@ -300,6 +308,9 @@ struct traits<KDOP<N>, Oriented, recursive> : base_traits {
   enum { IS_IMPLEMENTED = false };
 };
 
+HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+
 struct mesh_mesh_run_test {
   mesh_mesh_run_test(const std::vector<Transform3f>& _transforms,
                      const CollisionRequest _request)
@@ -319,6 +330,8 @@ struct mesh_mesh_run_test {
 
   int indent;
 
+HPP_FCL_COMPILER_DIAGNOSTIC_POP
+
   const char* getindent() {
     assert(indent < 9);
     static const char* t[] = {"",
@@ -628,11 +641,16 @@ BOOST_AUTO_TEST_CASE(mesh_mesh) {
             << transforms[i].getQuatRotation().coeffs().format(f));
   }
 
+HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+
   // Request all contacts and check that all methods give the same result.
   mesh_mesh_run_test runner(
       transforms, CollisionRequest(CONTACT, (size_t)num_max_contacts));
   runner.enable_statistics = true;
   boost::mpl::for_each<BVs_t, wrap<boost::mpl::placeholders::_1> >(runner);
+
+HPP_FCL_COMPILER_DIAGNOSTIC_POP
 }
 
 BOOST_AUTO_TEST_CASE(mesh_mesh_benchmark) {
diff --git a/test/serialization.cpp b/test/serialization.cpp
index c8a0231b0..46177408c 100644
--- a/test/serialization.cpp
+++ b/test/serialization.cpp
@@ -36,6 +36,11 @@
 #include <fstream>
 #include <boost/test/included/unit_test.hpp>
 
+#include <hpp/fcl/fwd.hh>
+
+HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+
 #include <hpp/fcl/collision.h>
 #include <hpp/fcl/contact_patch.h>
 #include <hpp/fcl/distance.h>
@@ -584,3 +589,5 @@ BOOST_AUTO_TEST_CASE(test_memory_footprint) {
   BOOST_CHECK(static_cast<size_t>(m1.memUsage(false)) ==
               computeMemoryFootprint(m1));
 }
+
+HPP_FCL_COMPILER_DIAGNOSTIC_POP

From 48d9c0655f229a6e5fdc865766513a224e24f063 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:12:34 +0100
Subject: [PATCH 02/22] fwd.hh: Add
 HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED

---
 include/hpp/fcl/fwd.hh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 1d51a4f40..c442ebe8a 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -95,15 +95,20 @@
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
+  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #elif defined(WIN32)
 #define HPP_FCL_COMPILER_DIAGNOSTIC_PUSH _Pragma("warning(push)")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("warning(pop)")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("warning(disable : 4996)")
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
+  _Pragma("warning(disable : 4700)")
 #else
 #define HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
 #endif  // __GNUC__
 
 namespace hpp {

From e2c3a3a3b1fd7d8cd6c80448b19ead775cc43967 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:12:44 +0100
Subject: [PATCH 03/22] Address Wmaybe-uninitialized

---
 include/hpp/fcl/internal/traversal_node_setup.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/hpp/fcl/internal/traversal_node_setup.h b/include/hpp/fcl/internal/traversal_node_setup.h
index 76ed7e008..20b5c71db 100644
--- a/include/hpp/fcl/internal/traversal_node_setup.h
+++ b/include/hpp/fcl/internal/traversal_node_setup.h
@@ -682,9 +682,14 @@ bool initialize(MeshDistanceTraversalNode<BV, 0>& node,
   node.tri_indices2 =
       model2.tri_indices.get() ? model2.tri_indices->data() : NULL;
 
+  HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+  HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
+
   relativeTransform(tf1.getRotation(), tf1.getTranslation(), tf2.getRotation(),
                     tf2.getTranslation(), node.RT.R, node.RT.T);
 
+  HPP_FCL_COMPILER_DIAGNOSTIC_POP
+
   return true;
 }
 

From 53b25d6cb8fa5d1f7a7f2df2e57ad113371b2644 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:12:55 +0100
Subject: [PATCH 04/22] Address more Wpedantic

---
 src/narrowphase/support_functions.cpp | 36 ++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/narrowphase/support_functions.cpp b/src/narrowphase/support_functions.cpp
index 5b39f152f..a427e3a8d 100644
--- a/src/narrowphase/support_functions.cpp
+++ b/src/narrowphase/support_functions.cpp
@@ -570,13 +570,15 @@ void getShapeSupportSet(const TriangleP* triangle, SupportSet& support_set,
     }
   }
 }
-getShapeSupportSetTplInstantiation(TriangleP);
+// clang-format off
+getShapeSupportSetTplInstantiation(TriangleP)
 
 // ============================================================================
 template <int _SupportOptions>
 void getShapeSupportSet(const Box* box, SupportSet& support_set,
                         int& hint /*unused*/, ShapeSupportData& support_data,
                         size_t /*unused*/, FCL_REAL tol) {
+// clang-format on
   assert(tol > 0);
   Vec3f support;
   const Vec3f& support_dir = support_set.getNormal();
@@ -612,7 +614,8 @@ void getShapeSupportSet(const Box* box, SupportSet& support_set,
   }
   computeSupportSetConvexHull(polygon, support_set.points());
 }
-getShapeSupportSetTplInstantiation(Box);
+// clang-format off
+getShapeSupportSetTplInstantiation(Box)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -620,6 +623,7 @@ void getShapeSupportSet(const Sphere* sphere, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL /*unused*/) {
+// clang-format on
   support_set.points().clear();
 
   Vec3f support;
@@ -628,13 +632,15 @@ void getShapeSupportSet(const Sphere* sphere, SupportSet& support_set,
                                    support_data);
   support_set.addPoint(support);
 }
-getShapeSupportSetTplInstantiation(Sphere);
+// clang-format off
+getShapeSupportSetTplInstantiation(Sphere)
 
 // ============================================================================
 template <int _SupportOptions>
 void getShapeSupportSet(const Ellipsoid* ellipsoid, SupportSet& support_set,
                         int& hint, ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL /*unused*/) {
+// clang-format on
   support_set.points().clear();
 
   Vec3f support;
@@ -643,7 +649,8 @@ void getShapeSupportSet(const Ellipsoid* ellipsoid, SupportSet& support_set,
                                    support_data);
   support_set.addPoint(support);
 }
-getShapeSupportSetTplInstantiation(Ellipsoid);
+// clang-format off
+getShapeSupportSetTplInstantiation(Ellipsoid)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -651,6 +658,7 @@ void getShapeSupportSet(const Capsule* capsule, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL tol) {
+// clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -686,7 +694,8 @@ void getShapeSupportSet(const Capsule* capsule, SupportSet& support_set,
     }
   }
 }
-getShapeSupportSetTplInstantiation(Capsule);
+// clang-format off
+getShapeSupportSetTplInstantiation(Capsule)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -694,6 +703,7 @@ void getShapeSupportSet(const Cone* cone, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports, FCL_REAL tol) {
+// clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -757,7 +767,8 @@ void getShapeSupportSet(const Cone* cone, SupportSet& support_set,
     }
   }
 }
-getShapeSupportSetTplInstantiation(Cone);
+// clang-format off
+getShapeSupportSetTplInstantiation(Cone)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -765,6 +776,7 @@ void getShapeSupportSet(const Cylinder* cylinder, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports, FCL_REAL tol) {
+// clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -819,7 +831,8 @@ void getShapeSupportSet(const Cylinder* cylinder, SupportSet& support_set,
     }
   }
 }
-getShapeSupportSetTplInstantiation(Cylinder);
+// clang-format off
+getShapeSupportSetTplInstantiation(Cylinder)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -827,6 +840,7 @@ void getShapeSupportSetLinear(const ConvexBase* convex, SupportSet& support_set,
                               int& hint /*unused*/,
                               ShapeSupportData& support_data, size_t /*unused*/,
                               FCL_REAL tol) {
+// clang-format on
   assert(tol > 0);
   Vec3f support;
   const Vec3f& support_dir = support_set.getNormal();
@@ -943,7 +957,8 @@ void getShapeSupportSet(const ConvexBase* convex, SupportSet& support_set,
         convex, support_set, hint, support_data, num_sampled_supports, tol);
   }
 }
-getShapeSupportSetTplInstantiation(ConvexBase);
+// clang-format off
+getShapeSupportSetTplInstantiation(ConvexBase)
 
 // ============================================================================
 template <int _SupportOptions>
@@ -951,17 +966,20 @@ void getShapeSupportSet(const SmallConvex* convex, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports /*unused*/, FCL_REAL tol) {
+// clang-format on
   getShapeSupportSetLinear<_SupportOptions>(
       reinterpret_cast<const ConvexBase*>(convex), support_set, hint,
       support_data, num_sampled_supports, tol);
 }
-getShapeSupportSetTplInstantiation(SmallConvex);
+// clang-format off
+getShapeSupportSetTplInstantiation(SmallConvex)
 
 // ============================================================================
 template <int _SupportOptions>
 void getShapeSupportSet(const LargeConvex* convex, SupportSet& support_set,
                         int& hint, ShapeSupportData& support_data,
                         size_t num_sampled_supports /*unused*/, FCL_REAL tol) {
+// clang-format on
   getShapeSupportSetLog<_SupportOptions>(
       reinterpret_cast<const ConvexBase*>(convex), support_set, hint,
       support_data, num_sampled_supports, tol);

From 383f91274d0a657be1c53d9572fccfb9585e9e45 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sat, 29 Jun 2024 16:15:09 +0000
Subject: [PATCH 05/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 src/narrowphase/support_functions.cpp | 18 +++++++++---------
 test/collision.cpp                    |  8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/narrowphase/support_functions.cpp b/src/narrowphase/support_functions.cpp
index a427e3a8d..1637909af 100644
--- a/src/narrowphase/support_functions.cpp
+++ b/src/narrowphase/support_functions.cpp
@@ -578,7 +578,7 @@ template <int _SupportOptions>
 void getShapeSupportSet(const Box* box, SupportSet& support_set,
                         int& hint /*unused*/, ShapeSupportData& support_data,
                         size_t /*unused*/, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   assert(tol > 0);
   Vec3f support;
   const Vec3f& support_dir = support_set.getNormal();
@@ -623,7 +623,7 @@ void getShapeSupportSet(const Sphere* sphere, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL /*unused*/) {
-// clang-format on
+  // clang-format on
   support_set.points().clear();
 
   Vec3f support;
@@ -640,7 +640,7 @@ template <int _SupportOptions>
 void getShapeSupportSet(const Ellipsoid* ellipsoid, SupportSet& support_set,
                         int& hint, ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL /*unused*/) {
-// clang-format on
+  // clang-format on
   support_set.points().clear();
 
   Vec3f support;
@@ -658,7 +658,7 @@ void getShapeSupportSet(const Capsule* capsule, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t /*unused*/, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -703,7 +703,7 @@ void getShapeSupportSet(const Cone* cone, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -776,7 +776,7 @@ void getShapeSupportSet(const Cylinder* cylinder, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   assert(tol > 0);
   support_set.points().clear();
 
@@ -840,7 +840,7 @@ void getShapeSupportSetLinear(const ConvexBase* convex, SupportSet& support_set,
                               int& hint /*unused*/,
                               ShapeSupportData& support_data, size_t /*unused*/,
                               FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   assert(tol > 0);
   Vec3f support;
   const Vec3f& support_dir = support_set.getNormal();
@@ -966,7 +966,7 @@ void getShapeSupportSet(const SmallConvex* convex, SupportSet& support_set,
                         int& hint /*unused*/,
                         ShapeSupportData& support_data /*unused*/,
                         size_t num_sampled_supports /*unused*/, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   getShapeSupportSetLinear<_SupportOptions>(
       reinterpret_cast<const ConvexBase*>(convex), support_set, hint,
       support_data, num_sampled_supports, tol);
@@ -979,7 +979,7 @@ template <int _SupportOptions>
 void getShapeSupportSet(const LargeConvex* convex, SupportSet& support_set,
                         int& hint, ShapeSupportData& support_data,
                         size_t num_sampled_supports /*unused*/, FCL_REAL tol) {
-// clang-format on
+  // clang-format on
   getShapeSupportSetLog<_SupportOptions>(
       reinterpret_cast<const ConvexBase*>(convex), support_set, hint,
       support_data, num_sampled_supports, tol);
diff --git a/test/collision.cpp b/test/collision.cpp
index 764489fea..5b70aae4b 100644
--- a/test/collision.cpp
+++ b/test/collision.cpp
@@ -330,7 +330,7 @@ struct mesh_mesh_run_test {
 
   int indent;
 
-HPP_FCL_COMPILER_DIAGNOSTIC_POP
+  HPP_FCL_COMPILER_DIAGNOSTIC_POP
 
   const char* getindent() {
     assert(indent < 9);
@@ -641,8 +641,8 @@ BOOST_AUTO_TEST_CASE(mesh_mesh) {
             << transforms[i].getQuatRotation().coeffs().format(f));
   }
 
-HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
-HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
+  HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+  HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
 
   // Request all contacts and check that all methods give the same result.
   mesh_mesh_run_test runner(
@@ -650,7 +650,7 @@ HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
   runner.enable_statistics = true;
   boost::mpl::for_each<BVs_t, wrap<boost::mpl::placeholders::_1> >(runner);
 
-HPP_FCL_COMPILER_DIAGNOSTIC_POP
+  HPP_FCL_COMPILER_DIAGNOSTIC_POP
 }
 
 BOOST_AUTO_TEST_CASE(mesh_mesh_benchmark) {

From 32f1ffa7403e9cb235e7755017b58bdf278ab813 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:40:52 +0100
Subject: [PATCH 06/22] Fix
 HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED

---
 include/hpp/fcl/fwd.hh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index c442ebe8a..0f2ede284 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -95,8 +95,12 @@
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
-  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+#if !defined(__has_warning) || __has_warning("-Wmaybe-uninitialized")
+  #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
+    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+#else
+  #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
+#endif
 #elif defined(WIN32)
 #define HPP_FCL_COMPILER_DIAGNOSTIC_PUSH _Pragma("warning(push)")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("warning(pop)")

From 6d97e9414b1a0bc6bade509b22d0a3aea42d6121 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:41:00 +0100
Subject: [PATCH 07/22] Update CHANGELOG

---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f0dd9777..ce17ca4b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,7 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
 ### Fixed
 
-- Compiler warnings ([#601](https://github.com/humanoid-path-planner/hpp-fcl/pull/601))
+- Compiler warnings ([#601](https://github.com/humanoid-path-planner/hpp-fcl/pull/601), [#605](https://github.com/humanoid-path-planner/hpp-fcl/pull/605))
 - CMake: fix assimp finder
 - Don't define GCC7 Boost serialization hack when `HPP_FCL_SKIP_EIGEN_BOOST_SERIALIZATION` is defined ([#530](https://github.com/humanoid-path-planner/hpp-fcl/pull/530))
 - Default parameters for narrowphase algorithms (GJK and EPA); fixed assertion checks that were sometimes failing in GJK simplex projection and BVH `collide` ([#531](https://github.com/humanoid-path-planner/hpp-fcl/pull/531)).

From 31bdc37227370cd147e665fc850d547b04f69352 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sat, 29 Jun 2024 17:43:42 +0100
Subject: [PATCH 08/22] [CI] Reactivate Rolling

---
 .github/workflows/ros_ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ros_ci.yml b/.github/workflows/ros_ci.yml
index 04fc0a82d..1797dfea3 100644
--- a/.github/workflows/ros_ci.yml
+++ b/.github/workflows/ros_ci.yml
@@ -14,14 +14,14 @@ jobs:
           - {ROS_DISTRO: noetic}
           - {ROS_DISTRO: iron}
           - {ROS_DISTRO: humble}
-          #- {ROS_DISTRO: rolling, PRERELEASE: false}  # 2024-04-02: turn off prerelease until Noble is stable; turned off entirely until eigenpy is available
+          - {ROS_DISTRO: rolling}
     env:
       #CCACHE_DIR: /github/home/.ccache # Enable ccache
       BUILDER: colcon
       PRERELEASE: true
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
           submodules: recursive
       # This step will fetch/store the directory used by ccache before/after the ci run

From 102415728a6b66966479d304b984325ba1c51b75 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sat, 29 Jun 2024 16:52:19 +0000
Subject: [PATCH 09/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 include/hpp/fcl/fwd.hh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 0f2ede284..1046f6d53 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -96,10 +96,10 @@
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
 #if !defined(__has_warning) || __has_warning("-Wmaybe-uninitialized")
-  #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
-    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
+  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else
-  #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
 #endif
 #elif defined(WIN32)
 #define HPP_FCL_COMPILER_DIAGNOSTIC_PUSH _Pragma("warning(push)")

From 5461edf77627e0dd93a038d5310bd4cac0a4850a Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 08:05:33 +0100
Subject: [PATCH 10/22] [CI] Disable Rolling again, still failing

---
 .github/workflows/ros_ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ros_ci.yml b/.github/workflows/ros_ci.yml
index 1797dfea3..4595a358d 100644
--- a/.github/workflows/ros_ci.yml
+++ b/.github/workflows/ros_ci.yml
@@ -14,7 +14,7 @@ jobs:
           - {ROS_DISTRO: noetic}
           - {ROS_DISTRO: iron}
           - {ROS_DISTRO: humble}
-          - {ROS_DISTRO: rolling}
+          #- {ROS_DISTRO: rolling}
     env:
       #CCACHE_DIR: /github/home/.ccache # Enable ccache
       BUILDER: colcon

From ed1ffe95ba9a6966d5aa49de9aee7029cdaf07b9 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 14:40:26 +0100
Subject: [PATCH 11/22] Fix macro check build failure

---
 include/hpp/fcl/fwd.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 1046f6d53..84789050a 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -95,7 +95,7 @@
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-#if !defined(__has_warning) || __has_warning("-Wmaybe-uninitialized")
+#if defined(__has_warning) && __has_warning("-Wmaybe-uninitialized")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From aea8a7dec7e3067edc4260a29c75bbbec75d8085 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 14:45:15 +0100
Subject: [PATCH 12/22] Change to logic that works with both gcc and clang

---
 include/hpp/fcl/fwd.hh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 84789050a..71e8a55c9 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -95,7 +95,10 @@
 #define HPP_FCL_COMPILER_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS \
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-#if defined(__has_warning) && __has_warning("-Wmaybe-uninitialized")
+
+// GCC version 4.6 and higher supports -Wmaybe-uninitialized
+// Use __has_warning with clang
+#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || (defined(__clang__) && __has_warning("-Wmaybe-uninitialized"))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From c32e77d7a55718dd34dbf9ed4f83b60fdb079609 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sun, 30 Jun 2024 13:45:28 +0000
Subject: [PATCH 13/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 include/hpp/fcl/fwd.hh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 71e8a55c9..076e34c0d 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -98,7 +98,9 @@
 
 // GCC version 4.6 and higher supports -Wmaybe-uninitialized
 // Use __has_warning with clang
-#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || (defined(__clang__) && __has_warning("-Wmaybe-uninitialized"))
+#if (defined(__GNUC__) &&                                           \
+     ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || \
+    (defined(__clang__) && __has_warning("-Wmaybe-uninitialized"))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From 23a4cadae99fd9135807340818cabcbffa361a4c Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 15:03:29 +0100
Subject: [PATCH 14/22] Another attempt at fixing the macro checks

---
 include/hpp/fcl/fwd.hh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 076e34c0d..d5cae2393 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -97,10 +97,11 @@
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
 
 // GCC version 4.6 and higher supports -Wmaybe-uninitialized
-// Use __has_warning with clang
+// Use __has_warning with clang. Clang introduced it in 2024 (3.5+)
 #if (defined(__GNUC__) &&                                           \
      ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || \
-    (defined(__clang__) && __has_warning("-Wmaybe-uninitialized"))
+    (defined(__clang__) && defined(__has_warning) && \
+    __has_warning("-Wmaybe-uninitialized"))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From ab87e20f0f5d261a5995896dee04861bbc1dee98 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sun, 30 Jun 2024 14:03:41 +0000
Subject: [PATCH 15/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 include/hpp/fcl/fwd.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index d5cae2393..985f96910 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -100,8 +100,8 @@
 // Use __has_warning with clang. Clang introduced it in 2024 (3.5+)
 #if (defined(__GNUC__) &&                                           \
      ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || \
-    (defined(__clang__) && defined(__has_warning) && \
-    __has_warning("-Wmaybe-uninitialized"))
+    (defined(__clang__) && defined(__has_warning) &&                \
+     __has_warning("-Wmaybe-uninitialized"))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From 2be2dc1d6457dc05811276b3804b2ad33c42f076 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 15:22:20 +0100
Subject: [PATCH 16/22] Fix macro with gcc

---
 include/hpp/fcl/fwd.hh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 985f96910..619847ab9 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -97,13 +97,15 @@
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
 
 // GCC version 4.6 and higher supports -Wmaybe-uninitialized
-// Use __has_warning with clang. Clang introduced it in 2024 (3.5+)
 #if (defined(__GNUC__) &&                                           \
-     ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || \
-    (defined(__clang__) && defined(__has_warning) &&                \
-     __has_warning("-Wmaybe-uninitialized"))
+     ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+// Use __has_warning with clang. Clang introduced it in 2024 (3.5+)
+#elif (defined(__clang__) && defined(__has_warning) &&              \
+     __has_warning("-Wmaybe-uninitialized"))
+#define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
+  _Pragma("clang diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
 #endif

From 68767da4e0be638bcfd1269010b0b5ac3b50ecf9 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sun, 30 Jun 2024 14:22:31 +0000
Subject: [PATCH 17/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 include/hpp/fcl/fwd.hh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/hpp/fcl/fwd.hh b/include/hpp/fcl/fwd.hh
index 619847ab9..cb756a84e 100644
--- a/include/hpp/fcl/fwd.hh
+++ b/include/hpp/fcl/fwd.hh
@@ -97,13 +97,13 @@
   _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
 
 // GCC version 4.6 and higher supports -Wmaybe-uninitialized
-#if (defined(__GNUC__) &&                                           \
+#if (defined(__GNUC__) && \
      ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 // Use __has_warning with clang. Clang introduced it in 2024 (3.5+)
-#elif (defined(__clang__) && defined(__has_warning) &&              \
-     __has_warning("-Wmaybe-uninitialized"))
+#elif (defined(__clang__) && defined(__has_warning) && \
+       __has_warning("-Wmaybe-uninitialized"))
 #define HPP_FCL_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED \
   _Pragma("clang diagnostic ignored \"-Wmaybe-uninitialized\"")
 #else

From 3f887e79682c600b2b080df45d3ce4d2aeb2da1e Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 16:31:38 +0100
Subject: [PATCH 18/22] One more pedantic

---
 src/narrowphase/support_functions.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/narrowphase/support_functions.cpp b/src/narrowphase/support_functions.cpp
index 1637909af..13d97e684 100644
--- a/src/narrowphase/support_functions.cpp
+++ b/src/narrowphase/support_functions.cpp
@@ -984,7 +984,9 @@ void getShapeSupportSet(const LargeConvex* convex, SupportSet& support_set,
       reinterpret_cast<const ConvexBase*>(convex), support_set, hint,
       support_data, num_sampled_supports, tol);
 }
-getShapeSupportSetTplInstantiation(LargeConvex);
+//clang-format off
+getShapeSupportSetTplInstantiation(LargeConvex)
+// clang-format on
 
 // ============================================================================
 HPP_FCL_DLLAPI void computeSupportSetConvexHull(SupportSet::Polygon& cloud,

From 853d5ee352c3b76536a691d043d74a687d7b2466 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 16:32:21 +0100
Subject: [PATCH 19/22] Conversion (template parameter type matching)

---
 test/normal_and_nearest_points.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/normal_and_nearest_points.cpp b/test/normal_and_nearest_points.cpp
index 696dd0269..a3ef2a696 100644
--- a/test/normal_and_nearest_points.cpp
+++ b/test/normal_and_nearest_points.cpp
@@ -240,7 +240,7 @@ void test_normal_and_nearest_points(
   }
 }
 
-template <size_t VecSize>
+template <int VecSize>
 Eigen::Matrix<FCL_REAL, VecSize, 1> generateRandomVector(FCL_REAL min,
                                                          FCL_REAL max) {
   typedef Eigen::Matrix<FCL_REAL, VecSize, 1> VecType;

From 8aade7e77efdb7f75e0a6611a716d02d80168ad7 Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 16:35:38 +0100
Subject: [PATCH 20/22] URL fix

---
 INSTALL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/INSTALL b/INSTALL
index 0f327aab5..1a315de79 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,7 +5,7 @@ Dependencies:
  - Eigen
  - Boost (thread, date_time, filesystem)
  - assimp
- - octomap (optional dependency, available at http://octomap.github.com)
+ - octomap (optional dependency, available at http://octomap.github.io)
  - Qhull (optional dependency, available at http://www.qhull.org)
 
 Boost and Eigen are mandatory dependencies. If Octomap is not found,

From c2f0aa344f5236423e42d313e22c84a40ea61d6e Mon Sep 17 00:00:00 2001
From: Wolfgang Merkt <w.merkt@gmail.com>
Date: Sun, 30 Jun 2024 16:40:25 +0100
Subject: [PATCH 21/22] Fix gcc Wconversion in macro

---
 include/hpp/fcl/serialization/fwd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/hpp/fcl/serialization/fwd.h b/include/hpp/fcl/serialization/fwd.h
index 0075ac064..0be3e677c 100644
--- a/include/hpp/fcl/serialization/fwd.h
+++ b/include/hpp/fcl/serialization/fwd.h
@@ -18,6 +18,7 @@
 #include <boost/serialization/shared_ptr.hpp>
 #include <boost/serialization/export.hpp>
 
+#include "hpp/fcl/fwd.hh"
 #include "hpp/fcl/serialization/eigen.h"
 
 #define HPP_FCL_SERIALIZATION_SPLIT(Type)                                \
@@ -74,7 +75,10 @@ struct cast_register_initializer {
   void init(std::false_type) const {}
 
   cast_register_initializer const& init() const {
+    HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
+    _Pragma("GCC diagnostic ignored \"-Wconversion\"")
     BOOST_STATIC_WARNING((std::is_base_of<Base, Derived>::value));
+    HPP_FCL_COMPILER_DIAGNOSTIC_POP
     init(std::is_base_of<Base, Derived>());
     return *this;
   }

From e12c707411c114167b1706075a4168fc7de7c29a Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
 <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Sun, 30 Jun 2024 15:40:49 +0000
Subject: [PATCH 22/22] [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
---
 include/hpp/fcl/serialization/fwd.h   | 2 +-
 src/narrowphase/support_functions.cpp | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/hpp/fcl/serialization/fwd.h b/include/hpp/fcl/serialization/fwd.h
index 0be3e677c..abb1943fc 100644
--- a/include/hpp/fcl/serialization/fwd.h
+++ b/include/hpp/fcl/serialization/fwd.h
@@ -77,7 +77,7 @@ struct cast_register_initializer {
   cast_register_initializer const& init() const {
     HPP_FCL_COMPILER_DIAGNOSTIC_PUSH
     _Pragma("GCC diagnostic ignored \"-Wconversion\"")
-    BOOST_STATIC_WARNING((std::is_base_of<Base, Derived>::value));
+        BOOST_STATIC_WARNING((std::is_base_of<Base, Derived>::value));
     HPP_FCL_COMPILER_DIAGNOSTIC_POP
     init(std::is_base_of<Base, Derived>());
     return *this;
diff --git a/src/narrowphase/support_functions.cpp b/src/narrowphase/support_functions.cpp
index 13d97e684..3b632abb9 100644
--- a/src/narrowphase/support_functions.cpp
+++ b/src/narrowphase/support_functions.cpp
@@ -986,11 +986,12 @@ void getShapeSupportSet(const LargeConvex* convex, SupportSet& support_set,
 }
 //clang-format off
 getShapeSupportSetTplInstantiation(LargeConvex)
-// clang-format on
+    // clang-format on
 
-// ============================================================================
-HPP_FCL_DLLAPI void computeSupportSetConvexHull(SupportSet::Polygon& cloud,
-                                                SupportSet::Polygon& cvx_hull) {
+    // ============================================================================
+    HPP_FCL_DLLAPI
+    void computeSupportSetConvexHull(SupportSet::Polygon& cloud,
+                                     SupportSet::Polygon& cvx_hull) {
   cvx_hull.clear();
 
   if (cloud.size() <= 2) {