From d845cf5402873f22dcb3b45ddb7cfa0f84575fc6 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Fri, 21 Jun 2024 21:46:53 -0700 Subject: [PATCH] Fix unused parameter warnings (#202) --- cmake/modules/CompilerFlags.cmake | 2 +- src/optimization/HolonomicTrajoptUtil.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/modules/CompilerFlags.cmake b/cmake/modules/CompilerFlags.cmake index 4331baf9..a248854d 100644 --- a/cmake/modules/CompilerFlags.cmake +++ b/cmake/modules/CompilerFlags.cmake @@ -2,7 +2,7 @@ macro(compiler_flags target) if(NOT MSVC) target_compile_options( ${target} - PRIVATE -Wall -pedantic -Wextra -Werror -Wno-unused-parameter + PRIVATE -Wall -pedantic -Wextra -Werror ) else() # Suppress the following warnings: diff --git a/src/optimization/HolonomicTrajoptUtil.hpp b/src/optimization/HolonomicTrajoptUtil.hpp index d453a847..9f1147ed 100644 --- a/src/optimization/HolonomicTrajoptUtil.hpp +++ b/src/optimization/HolonomicTrajoptUtil.hpp @@ -19,8 +19,10 @@ inline void ApplyHolonomicConstraint( sleipnir::OptimizationProblem& problem, const sleipnir::Variable& x, const sleipnir::Variable& y, const sleipnir::Variable& theta, const sleipnir::Variable& vx, const sleipnir::Variable& vy, - const sleipnir::Variable& omega, const sleipnir::Variable& ax, - const sleipnir::Variable& ay, const sleipnir::Variable& alpha, + const sleipnir::Variable& omega, + [[maybe_unused]] const sleipnir::Variable& ax, + [[maybe_unused]] const sleipnir::Variable& ay, + [[maybe_unused]] const sleipnir::Variable& alpha, const HolonomicConstraint& constraint) { if (std::holds_alternative(constraint)) { const auto& velocityHolonomicConstraint =