Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ void CheckOther::commaSeparatedReturnError(const Token *tok)
" if (x)\n"
" return a + 1,\n"
" b++;\n"
"However it can be useful to use comma in macros. Cppcheck does not warn when such a "
"However it can be useful to use comma in macros. No warning is reported when such a "
"macro is then used in a return statement, it is less likely such code is misunderstood.", CWE398, Certainty::normal);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str

if (!hasValidConfig && configurations.size() > 1 && mSettings.severity.isEnabled(Severity::information)) {
std::string msg;
msg = "This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details.";
msg += "\nThis file is not analyzed. Cppcheck failed to extract a valid configuration. The tested configurations have these preprocessor errors:";
msg = "This file is not analyzed. No working configuration could be extracted. Use -v for more details.";
msg += "\nThis file is not analyzed. No working configuration could be extracted. The tested configurations have these preprocessor errors:";
for (const std::string &s : configurationError)
msg += '\n' + s;

Expand Down
4 changes: 2 additions & 2 deletions lib/importproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti
else if (strcmp(childname, Settings::SafeChecks::XmlExternalVariables) == 0)
temp.safeChecks.externalVariables = true;
else {
errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck project file");
errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck GUI project file");
return false;
}
}
Expand All @@ -1451,7 +1451,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti
else if (strcmp(name, CppcheckXml::ProjectNameElementName) == 0)
; // no-op
else {
errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck project file");
errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck GUI project file");
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/mathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ std::string MathLib::calculate(const std::string &first, const std::string &seco
return MathLib::toString(MathLib::toBigNumber(first) ^ MathLib::toBigNumber(second)) + intsuffix(first, second);

default:
throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to Cppcheck developers.");
throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to the developers.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line
}
ErrorMessage errmsg(std::move(locationList), mFile0, Severity::information,
(headerType==SystemHeader) ?
"Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." :
"Include file: <" + header + "> not found. Please note: Standard library headers do not need to be provided to get proper results." :
"Include file: \"" + header + "\" not found.",
(headerType==SystemHeader) ? "missingIncludeSystem" : "missingInclude",
Certainty::normal);
Expand Down
2 changes: 1 addition & 1 deletion lib/templatesimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
"templateRecursion",
"TemplateSimplifier: max template recursion ("
+ std::to_string(mSettings.maxTemplateRecursion)
+ ") reached for template '"+typeForNewName+"'. You might want to limit Cppcheck recursion.",
+ ") reached for template '"+typeForNewName+"'. You might want to limit recursion.",
Certainty::normal);
mErrorLogger.reportErr(errmsg);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ int multiComparePercent(const Token *tok, const char*& haystack, nonneg int vari
return 1;
} else { // %varid%
if (varid == 0) {
throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers");
throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to the developers");
}

haystack += 6;
Expand Down