Fix CodeQL warning, Multiplication result converted to larger type

This commit is contained in:
Daniel Marjamäki 2020-11-06 19:50:05 +01:00
parent 52b88bcee3
commit 88a35d2253
4 changed files with 13 additions and 13 deletions

View File

@ -596,8 +596,8 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti
value2.isIntValue())) {
ValueFlow::Value result(0);
combineValueProperties(value1, value2, &result);
const float floatValue1 = value1.isIntValue() ? value1.intvalue : value1.floatValue;
const float floatValue2 = value2.isIntValue() ? value2.intvalue : value2.floatValue;
const double floatValue1 = value1.isIntValue() ? value1.intvalue : value1.floatValue;
const double floatValue2 = value2.isIntValue() ? value2.intvalue : value2.floatValue;
switch (parent->str()[0]) {
case '+':
if (value1.isTokValue() || value2.isTokValue())