mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Added data parameter to statement has no effect checker
This commit is contained in:
parent
6882aa6e56
commit
823deee35f
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
|||
defaultSeverity="Warning"
|
||||
description="Finds statements like 'a;' or '-a;' or 'a-b;' which do no seems to have any side effect therefore suspicious"
|
||||
id="org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem"
|
||||
messagePattern="Statement has no effect"
|
||||
messagePattern="Statement has no effect ''{0}''"
|
||||
name="Statement has no effect"/>
|
||||
</checker>
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker {
|
|||
if (stmt instanceof IASTExpressionStatement) {
|
||||
if (hasNoEffect(((IASTExpressionStatement) stmt)
|
||||
.getExpression())) {
|
||||
reportProblem(ER_ID, stmt);
|
||||
reportProblem(ER_ID, stmt, stmt.getRawSignature());
|
||||
}
|
||||
return PROCESS_SKIP;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue