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

View File

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