diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 2ca53049d..099bcd018 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1290,6 +1290,7 @@ std::string CheckUninitVar::MyFileInfo::toString() const ret << " functionName << '\"' << " argnr=\"" << it->argnr << '\"' + << " variableName=\"" << it->variableName << "\"" << " fileName=\"" << it->location.fileName << '\"' << " linenr=\"" << it->location.linenr << '\"' << "/>\n"; @@ -1298,6 +1299,7 @@ std::string CheckUninitVar::MyFileInfo::toString() const ret << " functionName << '\"' << " argnr=\"" << it->argnr << '\"' + << " variableName=\"" << it->variableName << "\"" << " fileName=\"" << it->location.fileName << '\"' << " linenr=\"" << it->location.linenr << '\"' << "/>\n"; @@ -1314,7 +1316,7 @@ Check::FileInfo *CheckUninitVar::getFileInfo(const Tokenizer *tokenizer, const S // Parse all functions in TU for (scope = symbolDatabase->scopeList.begin(); scope != symbolDatabase->scopeList.end(); ++scope) { - if (!scope->isExecutable() || scope->type != Scope::eFunction) + if (!scope->isExecutable() || scope->type != Scope::eFunction || !scope->function) continue; const Function *const function = scope->function; @@ -1395,7 +1397,7 @@ Check::FileInfo * CheckUninitVar::loadFileInfoFromXml(const tinyxml2::XMLElement bool CheckUninitVar::analyseWholeProgram(const std::list &fileInfo, const Settings& settings, ErrorLogger &errorLogger) { - (void)settings; // This argument is unused + (void)settings; // This argument is unused // Merge all fileinfo.. MyFileInfo all;