We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
readability-math-missing-parentheses
1 parent e15dcd9 commit 3c86c5eCopy full SHA for 3c86c5e
1 file changed
lib/vf_common.cpp
@@ -101,7 +101,7 @@ namespace ValueFlow
101
return value;
102
103
const MathLib::biguint unsignedMaxValue = std::numeric_limits<MathLib::biguint>::max() >> ((sizeof(unsignedMaxValue) - value_size) * 8);
104
- const MathLib::biguint signBit = 1ULL << (value_size * 8 - 1);
+ const MathLib::biguint signBit = 1ULL << ((value_size * 8) - 1);
105
value &= unsignedMaxValue;
106
if (dst_sign == ValueType::Sign::SIGNED && (value & signBit))
107
value |= ~unsignedMaxValue;
0 commit comments