From 57ade25099e1ea0fadf4481b73e2037e149fa9f7 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Mon, 18 Jun 2012 13:08:01 +0200 Subject: [PATCH] Fixed checkio.cpp warning in #2123. --- lib/checkio.cpp | 4 ++-- lib/symboldatabase.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 24c619746..8322190b9 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -98,8 +98,8 @@ void CheckIO::checkFileUsage() std::map 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; diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index 26a2eab75..bb5891c6f 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -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]; }