Skip to content

Commit

Permalink
fix(unused): handle unused variables in the project
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnakumarg1984 committed Jun 22, 2023
1 parent 2031067 commit a4dfb5a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake_files/using.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class SARA : public std::vector<int> {
};

int main(int, char const**) {
SARA s = {0, 0};
[[maybe_unused]] SARA s = {0, 0};
return 0;
}
2 changes: 1 addition & 1 deletion cpp/examples/forward_backward/l2_inpainting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int main(int argc, char const **argv) {
// Here, we default to (y, Φx/ν - y)
Vector init_map = Vector::Ones(image.size()) * x_sigma;
Vector init_res = y - (sampling * init_map);
const std::tuple<Vector, Vector> warm_start = {init_map, init_res};
// [[maybe_unused]] const std::tuple<Vector, Vector> warm_start = {init_map, init_res};
auto const diagnostic = fb();
SOPT_HIGH_LOG("Forward backward returned {}", diagnostic.good);

Expand Down
2 changes: 1 addition & 1 deletion cpp/sopt/power_method.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class PowerMethod {
//! Number of iterations
t_uint niters;
//! Wether convergence was achieved
bool good;
// [[maybe_unuse]] bool good;
//! Magnitude of the eigenvalue
Scalar magnitude;
//! Corresponding eigenvector if converged
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/padmm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TEST_CASE("Proximal ADMM with ||x - x0||_2 functions", "[padmm][integration]") {

t_Matrix const mId = -t_Matrix::Identity(N, N);

t_Vector const translation = t_Vector::Ones(N) * 5;
// [[maybe_unused]] t_Vector const translation = t_Vector::Ones(N) * 5;
auto const padmm =
algorithm::ProximalADMM<Scalar>(g0, g1, t_Vector::Zero(N)).Phi(mId).itermax(3000).gamma(0.01);
auto const result = padmm();
Expand Down

0 comments on commit a4dfb5a

Please sign in to comment.