From 72b31221c171e39ef9db438f8c5107f067f58e02 Mon Sep 17 00:00:00 2001 From: Ankur Roy Chowdhury Date: Tue, 14 Feb 2023 17:45:23 -0800 Subject: [PATCH] Deal with '-Wunused-exception-parameter' from 'nonliner/utilities.h' --- gtsam/nonlinear/utilities.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/nonlinear/utilities.h b/gtsam/nonlinear/utilities.h index 2997ed7d7..0a0ceb849 100644 --- a/gtsam/nonlinear/utilities.h +++ b/gtsam/nonlinear/utilities.h @@ -328,12 +328,12 @@ Values localToWorld(const Values& local, const Pose2& base, // if value is a Pose2, compose it with base pose Pose2 pose = local.at(key); world.insert(key, base.compose(pose)); - } catch (const std::exception& e1) { + } catch ([[maybe_unused]] const std::exception& e1) { try { // if value is a Point2, transform it from base pose Point2 point = local.at(key); world.insert(key, base.transformFrom(point)); - } catch (const std::exception& e2) { + } catch ([[maybe_unused]] const std::exception& e2) { // if not Pose2 or Point2, do nothing #ifndef NDEBUG std::cerr << "Values[key] is neither Pose2 nor Point2, so skip" << std::endl;