fix #2884 (Integer overflow warning in 64-bit build)

This commit is contained in:
Robert Reif 2011-07-01 16:59:17 -04:00
parent db4a28d60b
commit d447e61b09
1 changed files with 4 additions and 4 deletions

View File

@ -859,16 +859,16 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
if (index_type->isUnsigned())
{
if (index_type->isLong())
dimension.num = ULLONG_MAX; // should be ULLONG_MAX + 1ULL;
dimension.num = ULLONG_MAX; // should be ULLONG_MAX + 1ULL
else
dimension.num = ULONG_MAX + 1ULL;
dimension.num = ULONG_MAX; // should be ULONG_MAX + 1ULL
}
else
{
if (index_type->isLong())
dimension.num = LLONG_MAX; // should be LLONG_MAX + 1LL;
dimension.num = LLONG_MAX; // should be LLONG_MAX + 1LL
else
dimension.num = LONG_MAX + 1LL;
dimension.num = LONG_MAX; // should be LONG_MAX + 1LL
}
}
}