mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +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"
|
defaultSeverity="Warning"
|
||||||
description="Finds statements like 'a;' or '-a;' or 'a-b;' which do no seems to have any side effect therefore suspicious"
|
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"
|
id="org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem"
|
||||||
messagePattern="Statement has no effect"
|
messagePattern="Statement has no effect ''{0}''"
|
||||||
name="Statement has no effect"/>
|
name="Statement has no effect"/>
|
||||||
</checker>
|
</checker>
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker {
|
||||||
if (stmt instanceof IASTExpressionStatement) {
|
if (stmt instanceof IASTExpressionStatement) {
|
||||||
if (hasNoEffect(((IASTExpressionStatement) stmt)
|
if (hasNoEffect(((IASTExpressionStatement) stmt)
|
||||||
.getExpression())) {
|
.getExpression())) {
|
||||||
reportProblem(ER_ID, stmt);
|
reportProblem(ER_ID, stmt, stmt.getRawSignature());
|
||||||
}
|
}
|
||||||
return PROCESS_SKIP;
|
return PROCESS_SKIP;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue