Internals: cppcheck cleanups. No functional change.

This commit is contained in:
Wilson Snyder
2025-06-28 12:29:41 -04:00
parent 62e5e3aa0c
commit b914cda1c7
20 changed files with 85 additions and 71 deletions
+6 -4
View File
@@ -172,10 +172,12 @@ void V3ErrorGuarded::v3errorEndGuts(std::ostringstream& sstr, const string& extr
// If suppressed print only first line to reduce verbosity
string firstLine = msg;
string::size_type pos;
if ((pos = firstLine.find('\n')) != string::npos) {
firstLine.erase(pos, firstLine.length() - pos);
firstLine += "...";
{
string::size_type pos;
if ((pos = firstLine.find('\n')) != string::npos) {
firstLine.erase(pos, firstLine.length() - pos);
firstLine += "...";
}
}
if (m_errorSuppressed) msg = firstLine;
// Suppress duplicate messages