Skip to content

Commit

Permalink
checkunusedfunctions.cpp: fixed variableScope selfcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 21, 2024
1 parent 4cbb342 commit 4173816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ void CheckUnusedFunctions::analyseWholeProgram(const Settings &settings, ErrorLo
continue;
}
if (std::strcmp(name,"functiondecl") == 0) {
const char* file = e2->Attribute("file");
const char* lineNumber = e2->Attribute("lineNumber");
if (lineNumber) {
const char* file = e2->Attribute("file");
// cppcheck-suppress templateInstantiation - TODO: fix this - see #11631
decls[functionName] = Location(file ? file : sourcefile, strToInt<int>(lineNumber));
}
Expand Down

0 comments on commit 4173816

Please sign in to comment.