diff --git a/Tests/CMakeLib/testDebuggerNamedPipe.cxx b/Tests/CMakeLib/testDebuggerNamedPipe.cxx index 1ae3f64484..67e13723d8 100644 --- a/Tests/CMakeLib/testDebuggerNamedPipe.cxx +++ b/Tests/CMakeLib/testDebuggerNamedPipe.cxx @@ -194,7 +194,7 @@ int runTest(int argc, char* argv[]) R"("command" *: *"disconnect".*"success" *: *true.*"type" *: *"response")" }; - for (auto& regexString : expectedResponses) { + for (const auto& regexString : expectedResponses) { cmsys::RegularExpression regex(regexString); if (!regex.find(debuggerResponse)) { std::cout << "Expected response not found: " << regexString << std::endl;