Fix compiler warnings about type mismatch
This commit is contained in:
parent
14def42c99
commit
df95cd09f0
|
@ -287,7 +287,7 @@ static bool checkMinSizes(const std::list<Library::ArgumentChecks::MinSize> &min
|
|||
case Library::ArgumentChecks::MinSize::ARGVALUE:
|
||||
if (Token::Match(argtok, "%num% ,|)")) {
|
||||
const MathLib::bigint sz = MathLib::toLongNumber(argtok->str());
|
||||
if (sz > arraySize)
|
||||
if ((std::size_t)sz > arraySize)
|
||||
error = true;
|
||||
} else if (argtok->type() == Token::eChar && Token::Match(argtok->next(), ",|)") && charSizeToken)
|
||||
*charSizeToken = argtok; //sizeArgumentAsCharError(argtok);
|
||||
|
@ -296,7 +296,7 @@ static bool checkMinSizes(const std::list<Library::ArgumentChecks::MinSize> &min
|
|||
// TODO: handle arbitrary arg2
|
||||
if (minsize->arg2 == minsize->arg+1 && Token::Match(argtok, "%num% , %num% ,|)")) {
|
||||
const MathLib::bigint sz = MathLib::toLongNumber(argtok->str()) * MathLib::toLongNumber(argtok->strAt(2));
|
||||
if (sz > arraySize)
|
||||
if ((std::size_t)sz > arraySize)
|
||||
error = true;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -77,7 +77,7 @@ unsigned int TokenList::appendFileIfNew(const std::string &fileName)
|
|||
// Has this file been tokenized already?
|
||||
for (std::size_t i = 0; i < _files.size(); ++i)
|
||||
if (Path::sameFileName(_files[i], fileName))
|
||||
return i;
|
||||
return (unsigned int)i;
|
||||
|
||||
// The "_files" vector remembers what files have been tokenized..
|
||||
_files.push_back(Path::simplifyPath(fileName));
|
||||
|
|
Loading…
Reference in New Issue