Skip to content

Commit ec63711

Browse files
committed
valueflow.cpp: fixed readability-math-missing-parentheses clang-tidy warnings
1 parent 9d469c3 commit ec63711

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ size_t ValueFlow::getSizeOf(const ValueType &vt, const Settings &settings, Accur
547547
if (currentBitfieldAlloc == 0) {
548548
bits = n * charBit;
549549
} else {
550-
bits = currentBitfieldAlloc * charBit - currentBitCount;
550+
bits = (currentBitfieldAlloc * charBit) - currentBitCount;
551551
}
552552
}
553553
if (bits > 0) {
@@ -570,7 +570,7 @@ size_t ValueFlow::getSizeOf(const ValueType &vt, const Settings &settings, Accur
570570
n *= dim;
571571
size_t padding = (a - (total % a)) % a;
572572
if (currentBitCount > 0) {
573-
bool fitsInBitfield = currentBitCount + n * charBit <= currentBitfieldAlloc * charBit;
573+
bool fitsInBitfield = currentBitCount + (n * charBit) <= currentBitfieldAlloc * charBit;
574574
bool isAligned = currentBitCount % (charBit * a) == 0;
575575
if (vt2.isIntegral() && fitsInBitfield && isAligned) {
576576
currentBitCount += charBit * n;

0 commit comments

Comments
 (0)