Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jun 17, 2024
1 parent 9faaba9 commit 36a57ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void CheckOther::checkRedundantAssignment()
tokenToCheck = tempToken;
}

if (start->hasKnownSymbolicValue(tokenToCheck) && Token::simpleMatch(start->astParent(), "=")) {
if (start->hasKnownSymbolicValue(tokenToCheck) && Token::simpleMatch(start->astParent(), "=")) {
redundantAssignmentSameValueError(start, tokenToCheck, tok->astOperand1()->expressionString());
}

Expand Down
2 changes: 1 addition & 1 deletion test/testother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10195,7 +10195,7 @@ class TestOther : public TestFixture {
" return a * b * c;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:5]: (style) Variable 'a' is assigned an expression that holds the same value.\n", errout_str());

check("int main() {\n"
" int a = 0;\n"
" int b = a;\n"
Expand Down

0 comments on commit 36a57ca

Please sign in to comment.