From c1a59c701f0f059c941a99a771999774aa2875b6 Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Mon, 3 Feb 2020 12:20:02 -0700 Subject: [PATCH] #659: Eliminate unused (member/capture) variables that Clang 7 warns about --- examples/collection_insert.cc | 2 +- examples/jacobi2d_vt.cc | 3 +-- examples/reduce.cc | 4 +--- examples/simple_collection_reduce.cc | 3 --- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/collection_insert.cc b/examples/collection_insert.cc index 9e27e3618b..57dcb65060 100644 --- a/examples/collection_insert.cc +++ b/examples/collection_insert.cc @@ -105,7 +105,7 @@ int main(int argc, char** argv) { for (int i = range.x()/2; i < range.x(); i++) { proxy[i].insert(i % 2); } - proxy.finishedInserting([proxy]{ + proxy.finishedInserting([]{ ::fmt::print("insertions are finished2\n"); }); }); diff --git a/examples/jacobi2d_vt.cc b/examples/jacobi2d_vt.cc index 1470267de2..e2044a5be6 100644 --- a/examples/jacobi2d_vt.cc +++ b/examples/jacobi2d_vt.cc @@ -94,7 +94,6 @@ struct LinearPb2DJacobi : vt::Collection { size_t numObjsX_ = 1, numObjsY_ = 1; size_t numRowsPerObject_ = default_nrow_object; size_t maxIter_ = 5; - double normRes_ = 0.0; public: @@ -106,7 +105,7 @@ struct LinearPb2DJacobi : vt::Collection { msgReceived_(0), totalReceive_(0), numObjsX_(1), numObjsY_(1), numRowsPerObject_(default_nrow_object), - maxIter_(5), normRes_(0.0) + maxIter_(5) { } diff --git a/examples/reduce.cc b/examples/reduce.cc index d69785fca4..fa46aae211 100644 --- a/examples/reduce.cc +++ b/examples/reduce.cc @@ -96,14 +96,12 @@ struct Integration1D : vt::Collection { size_t numObjs_ = default_num_objs; size_t numPartsPerObject_ = default_nparts_object; - double quadValue = 0.0; public: explicit Integration1D() : vt::Collection(), - numObjs_(default_num_objs), numPartsPerObject_(default_nparts_object), - quadValue(0.0) + numObjs_(default_num_objs), numPartsPerObject_(default_nparts_object) { } // diff --git a/examples/simple_collection_reduce.cc b/examples/simple_collection_reduce.cc index 2ebb0089dd..42387010b6 100644 --- a/examples/simple_collection_reduce.cc +++ b/examples/simple_collection_reduce.cc @@ -79,9 +79,6 @@ struct TestColl : Collection { rmsg->getVal() = 10; proxy.reduce>(rmsg.get(),cb); } - -private: - int32_t counter_ = 0; }; int main(int argc, char** argv) {