Fixed several MSVC warnings
This commit is contained in:
parent
f44d9d5c9b
commit
2e2800f5bd
|
@ -48,7 +48,7 @@ public:
|
|||
std::string file;
|
||||
|
||||
/** line number in (possibly included) file where directive is defined */
|
||||
int linenr;
|
||||
unsigned int linenr;
|
||||
|
||||
/** the actual directive text */
|
||||
std::string str;
|
||||
|
|
|
@ -4412,7 +4412,7 @@ void SymbolDatabase::setValueTypeInTokenList(Token *tokens, bool cpp, char defau
|
|||
ValueType::Type type = ValueType::Type::INT;
|
||||
if (MathLib::isIntHex(tok->str()))
|
||||
sign = ValueType::Sign::UNSIGNED;
|
||||
for (unsigned int pos = tok->str().size() - 1U; pos > 0U && std::isalpha(tok->str()[pos]); --pos) {
|
||||
for (std::size_t pos = tok->str().size() - 1U; pos > 0U && std::isalpha(tok->str()[pos]); --pos) {
|
||||
const char suffix = tok->str()[pos];
|
||||
if (suffix == 'u' || suffix == 'U')
|
||||
sign = ValueType::Sign::UNSIGNED;
|
||||
|
|
|
@ -2480,7 +2480,7 @@ private:
|
|||
"int c[A + 2];\n"
|
||||
"int d[10 + B];\n"
|
||||
"int e[A + B];\n");
|
||||
ASSERT(db);
|
||||
ASSERT(db != nullptr);
|
||||
if (!db)
|
||||
return;
|
||||
ASSERT_EQUALS(2U, db->scopeList.size());
|
||||
|
@ -2541,15 +2541,15 @@ private:
|
|||
"struct Barney : public Fred {\n"
|
||||
" Enum func(Enum e) { return e; }\n"
|
||||
"};");
|
||||
ASSERT(db);
|
||||
ASSERT(db != nullptr);
|
||||
if (!db)
|
||||
return;
|
||||
const Token * const functionToken = Token::findsimplematch(tokenizer.tokens(), "func");
|
||||
ASSERT(functionToken);
|
||||
ASSERT(functionToken != nullptr);
|
||||
if (!functionToken)
|
||||
return;
|
||||
const Function *function = functionToken->function();
|
||||
ASSERT(function);
|
||||
ASSERT(function != nullptr);
|
||||
if (!function)
|
||||
return;
|
||||
ASSERT(function->token->str() == "func");
|
||||
|
@ -2585,7 +2585,7 @@ private:
|
|||
"char array10[sizeof(L)];\n"
|
||||
"char array11[sizeof(ELL)];\n"
|
||||
"char array12[sizeof(LL)];\n");
|
||||
ASSERT(db);
|
||||
ASSERT(db != nullptr);
|
||||
if (!db)
|
||||
return;
|
||||
ASSERT(db->getVariableListSize() == 13); // the first one is not used
|
||||
|
|
Loading…
Reference in New Issue