Skip to content

Commit 61f4327

Browse files
Update checkother.cpp
1 parent acc143d commit 61f4327

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/checkother.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,7 +3571,7 @@ void CheckOtherImpl::negativeBitwiseShiftError(const Token *tok, bool isLHS, con
35713571
// is used often in a project and works as expected then this is
35723572
// a portability issue
35733573
const char* id = isLHS ? "shiftNegativeLHS" : "shiftNegative";
3574-
const std::string msg = isLHS ? "Shifting a negative value is technically undefined behaviour" : "Shifting by a negative value is undefined behaviour";
3574+
const std::string msg = isLHS ? "Shifting a negative value is technically undefined behaviour" : "Shifting by a negative value is undefined behaviour";
35753575
const Severity severity = isLHS ? Severity::portability : (v && v->errorSeverity() && !v->conditional ? Severity::error : Severity::warning);
35763576
const ErrorPath errorPath = getErrorPath(tok, v, msg);
35773577
reportError(errorPath, severity, id, msg, CWE758, Certainty::normal);
@@ -4934,8 +4934,8 @@ void CheckOther::getErrorMessages(ErrorLogger& errorLogger, const Settings &sett
49344934
c.zerodivError(nullptr, nullptr);
49354935
c.misusedScopeObjectError(nullptr, "varname");
49364936
c.invalidPointerCastError(nullptr, "float *", "double *", false, false);
4937-
c.negativeBitwiseShiftError(nullptr, 1);
4938-
c.negativeBitwiseShiftError(nullptr, 2);
4937+
c.negativeBitwiseShiftError(nullptr, true);
4938+
c.negativeBitwiseShiftError(nullptr, false);
49394939
c.raceAfterInterlockedDecrementError(nullptr);
49404940
c.invalidFreeError(nullptr, "malloc", false);
49414941
c.overlappingWriteUnion(nullptr);

0 commit comments

Comments
 (0)