Fixed checkio.cpp warning in #2123.

This commit is contained in:
Edoardo Prezioso 2012-06-18 13:08:01 +02:00
parent f98179a835
commit 57ade25099
2 changed files with 3 additions and 3 deletions

View File

@ -98,8 +98,8 @@ void CheckIO::checkFileUsage()
std::map<unsigned int, Filepointer> filepointers;
const SymbolDatabase* symbolDatabase = _tokenizer->getSymbolDatabase();
unsigned int varListSize = symbolDatabase->getVariableListSize();
for (unsigned int i = 1; i < varListSize; i++) {
size_t varListSize = symbolDatabase->getVariableListSize();
for (size_t i = 1; i < varListSize; ++i) {
const Variable* var = symbolDatabase->getVariableFromVarId(i);
if (!var || !var->varId() || !Token::Match(var->typeStartToken(), "FILE *"))
continue;

View File

@ -564,7 +564,7 @@ public:
return bool(classAndStructTypes.find(type) != classAndStructTypes.end());
}
const Variable *getVariableFromVarId(unsigned int varId) const {
const Variable *getVariableFromVarId(size_t varId) const {
return _variableList[varId];
}