Fixed Coverity warning. Coverity assumes that 'bits < 64' means that bits can be 63. That is not true here but anyway I think the code needed to be fixed.

This commit is contained in:
Daniel Marjamäki 2016-11-25 15:19:18 +01:00
parent 213589ee68
commit a198422f0e
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ void CheckType::checkFloatToIntegerOverflow()
bits = _settings->long_long_bit;
else
continue;
if (bits < 64 && it->floatValue > (1 << (bits - 1)))
if (bits < 64 && it->floatValue > (1ULL << (bits - 1)))
floatToIntegerOverflowError(tok, *it);
}
}