diff --git a/cpp/sopt/primal_dual.h b/cpp/sopt/primal_dual.h index 2767bcca0..c643e1a7b 100644 --- a/cpp/sopt/primal_dual.h +++ b/cpp/sopt/primal_dual.h @@ -244,7 +244,7 @@ class PrimalDual { //! //! This function simplifies creating overloads for operator() in PD wrappers. static std::tuple initial_guess(t_Vector const &target, - t_LinearTransform const &phi, Real nu) { + t_LinearTransform const &phi, Real /*nu*/) { std::tuple guess; std::get<0>(guess) = static_cast(phi.adjoint() * target); std::get<1>(guess) = target; diff --git a/cpp/sopt/proximal.h b/cpp/sopt/proximal.h index a3d4e21e3..42bb364f8 100644 --- a/cpp/sopt/proximal.h +++ b/cpp/sopt/proximal.h @@ -132,7 +132,7 @@ void tv_norm(Eigen::DenseBase &out, Eigen::DenseBase const &gamma, //! Proximal of a function that is always zero, the identity template -void id(Eigen::DenseBase &out, typename real_type::type gamma, +void id(Eigen::DenseBase &out, typename real_type::type /*gamma*/, Eigen::DenseBase const &x) { out = x; } diff --git a/cpp/sopt/tf_g_proximal.h b/cpp/sopt/tf_g_proximal.h index ea6e7fb30..7aac7b885 100644 --- a/cpp/sopt/tf_g_proximal.h +++ b/cpp/sopt/tf_g_proximal.h @@ -63,7 +63,7 @@ class TFGProximal : public GProximal { // Return g_proximal as a lambda function. Used in operator() in base class. t_Proximal proximal_function() const override { - return [this](t_Vector &out, Real gamma, t_Vector const &x) { + return [this](t_Vector &out, Real /*gamma*/, t_Vector const &x) { this -> call_model(out, x); }; } diff --git a/cpp/sopt/wavelets.h b/cpp/sopt/wavelets.h index 197d1c427..8ceb78d45 100644 --- a/cpp/sopt/wavelets.h +++ b/cpp/sopt/wavelets.h @@ -108,7 +108,7 @@ Vector &get_wavelet_basis_coefficients(Vector &coeffs, const t_uint basis_ return coeffs.segment(basis_index * size, size); } template -Vector &get_wavelet_levels_1d(Vector &coeffs, const t_uint level, const t_uint size) { +Vector &get_wavelet_levels_1d(Vector &coeffs, const t_uint level, const t_uint /*size*/) { auto const N = static_cast(coeffs.size()) >> level; // bitshift to divide by 2^level return coeffs.head(N); } diff --git a/cpp/tests/credible_region.cc b/cpp/tests/credible_region.cc index d50b0d225..70ae272d1 100644 --- a/cpp/tests/credible_region.cc +++ b/cpp/tests/credible_region.cc @@ -14,7 +14,7 @@ t_uint N = rows * cols; TEST_CASE("calculating gamma") { sopt::logging::set_level("debug"); - const std::function energy_function = [](const t_Vector &input) -> t_real { + const std::function energy_function = [](const t_Vector & /*input*/) -> t_real { return 0.; }; const t_Vector x = t_Vector::Random(N); diff --git a/cpp/tests/forward_backward.cc b/cpp/tests/forward_backward.cc index ab1c195bd..8b2d2f43a 100644 --- a/cpp/tests/forward_backward.cc +++ b/cpp/tests/forward_backward.cc @@ -39,7 +39,7 @@ TEST_CASE("Forward Backward with ||x - x0||_2^2 function", "[fb]") { auto const grad = [](t_Vector &out, const t_Vector &x) { out = x; }; const t_Vector x_guess = t_Vector::Random(target0.size()); const t_Vector res = x_guess - target0; - auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool { + auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool { return x.isApprox(target0, 1e-9); }; CAPTURE(target0); diff --git a/cpp/tests/primal_dual.cc b/cpp/tests/primal_dual.cc index 68cdb957c..41c438239 100644 --- a/cpp/tests/primal_dual.cc +++ b/cpp/tests/primal_dual.cc @@ -60,7 +60,7 @@ TEST_CASE("Primal Dual with 0.5 * ||x - x0||_2^2 function", "[primaldual]") { auto const g = proximal::L2Norm(); const t_Vector x_guess = t_Vector::Random(target0.size()); const t_Vector res = x_guess - target0; - auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool { + auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool { return x.isApprox(target0, 1e-9); }; CAPTURE(target0);