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