From d447e61b09f89ae0755543d30653dc8b467a0aa2 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Fri, 1 Jul 2011 16:59:17 -0400 Subject: [PATCH] fix #2884 (Integer overflow warning in 64-bit build) --- lib/symboldatabase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 49327ef8c..4339c0ec6 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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 } } }