Skip to content

Commit 298d360

Browse files
committed
Remove unnecessary isExcluded
Applying the exclusion to the variable is confusing and unnecessary in this particular case: int x = 0; // Does the deviation apply to the assignment or var?
1 parent 9caece3 commit 298d360

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

cpp/autosar/src/rules/A0-1-1/UselessAssignment.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ import codingstandards.cpp.deadcode.UselessAssignments
2121
from SsaDefinition ultimateDef, InterestingStackVariable v
2222
where
2323
not isExcluded(ultimateDef, DeadCodePackage::uselessAssignmentQuery()) and
24-
not isExcluded(v, DeadCodePackage::uselessAssignmentQuery()) and
2524
isUselessSsaDefinition(ultimateDef, v)
2625
select ultimateDef, "Definition of $@ is unused.", v, v.getName()

0 commit comments

Comments
 (0)