Skip to content

Commit a4dfb5a

Browse files
fix(unused): handle unused variables in the project
1 parent 2031067 commit a4dfb5a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cmake_files/using.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class SARA : public std::vector<int> {
88
};
99

1010
int main(int, char const**) {
11-
SARA s = {0, 0};
11+
[[maybe_unused]] SARA s = {0, 0};
1212
return 0;
1313
}

cpp/examples/forward_backward/l2_inpainting.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int main(int argc, char const **argv) {
104104
// Here, we default to (y, Φx/ν - y)
105105
Vector init_map = Vector::Ones(image.size()) * x_sigma;
106106
Vector init_res = y - (sampling * init_map);
107-
const std::tuple<Vector, Vector> warm_start = {init_map, init_res};
107+
// [[maybe_unused]] const std::tuple<Vector, Vector> warm_start = {init_map, init_res};
108108
auto const diagnostic = fb();
109109
SOPT_HIGH_LOG("Forward backward returned {}", diagnostic.good);
110110

cpp/sopt/power_method.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class PowerMethod {
151151
//! Number of iterations
152152
t_uint niters;
153153
//! Wether convergence was achieved
154-
bool good;
154+
// [[maybe_unuse]] bool good;
155155
//! Magnitude of the eigenvalue
156156
Scalar magnitude;
157157
//! Corresponding eigenvector if converged

cpp/tests/padmm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TEST_CASE("Proximal ADMM with ||x - x0||_2 functions", "[padmm][integration]") {
2929

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

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

0 commit comments

Comments
 (0)