Skip to content
Snippets Groups Projects
Commit 8be96137 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[cleanup] Mark loop variable as unused

Here the purpose of the loop is to do some operation several
times, but the operation does not depend on the loop variable
itself.
parent 19d8e135
Branches
Tags
1 merge request!253[cleanup] Fix warnings
......@@ -50,7 +50,7 @@ auto checkLogger(std::string format, std::string prefixRegex)
auto threads = std::vector<std::thread>();
for(auto i: Dune::range(3))
threads.emplace_back([&,i]() {
for(auto i: Dune::range(3))
for([[maybe_unused]] auto i: Dune::range(3))
{
using namespace std::chrono_literals;
std::this_thread::sleep_for(10ms);
......@@ -60,7 +60,7 @@ auto checkLogger(std::string format, std::string prefixRegex)
for(auto& thread: threads)
thread.join();
auto regex = std::string();
for(auto i: Dune::range(9))
for([[maybe_unused]] auto i: Dune::range(9))
regex = regex+prefixRegex+"foo\n";
testSuite.check(std::regex_match(sstream.str(), std::regex(regex)))
<< "Non-matching string generated by synchronized logger with format '" << format <<"'";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment