From bdb136de02de66f21a2dc6dde71d814ea8c0a4e6 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 24 Sep 2018 09:00:09 +0200 Subject: [PATCH] PCRE: Fixed unintended message when HAVE_RULES=yes was set. --- lib/cppcheck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index bb665eed8..5a29511e2 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -800,12 +800,12 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token while (pos < (int)str.size()) { const int pcreExecRet = pcre_exec(re, pcreExtra, str.c_str(), (int)str.size(), pos, 0, ovector, 30); if (pcreExecRet < 0) { - const std::string errorMessage = std::string("pcre_exec failed: ") + pcreErrorCodeToString(pcreExecRet); + const std::string errorMessage = pcreErrorCodeToString(pcreExecRet); if (!errorMessage.empty()) { const ErrorLogger::ErrorMessage errmsg(std::list(), emptyString, Severity::error, - errorMessage, + std::string("pcre_exec failed: ") + errorMessage, "pcre_exec", false);