Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Wesolowski2011-06-27 20:29:36 -0400
committerAlena Laskavaia2011-06-27 20:47:43 -0400
commit6b80326e1789315fc94f20aedf3e38b67f218a89 (patch)
tree17a3ddd1db9f2144aa1b43054182e7d773644e22 /codan/org.eclipse.cdt.codan.checkers
parent2041eb9870092b33d3fad240b840e216e5adac7a (diff)
downloadorg.eclipse.cdt-6b80326e1789315fc94f20aedf3e38b67f218a89.tar.gz
org.eclipse.cdt-6b80326e1789315fc94f20aedf3e38b67f218a89.tar.xz
org.eclipse.cdt-6b80326e1789315fc94f20aedf3e38b67f218a89.zip
Bug 345687 - [fp] "No return, in function returning non-void" for
compound statement at the end
Diffstat (limited to 'codan/org.eclipse.cdt.codan.checkers')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
index b917dece9b..86a9d9e25a 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ReturnChecker.java
@@ -192,7 +192,7 @@ public class ReturnChecker extends AbstractAstFunctionChecker {
*/
private boolean isCompoundStatement(IASTStatement last) {
return last instanceof IASTIfStatement || last instanceof IASTWhileStatement || last instanceof IASTDoStatement
- || last instanceof IASTForStatement || last instanceof IASTSwitchStatement;
+ || last instanceof IASTForStatement || last instanceof IASTSwitchStatement || last instanceof IASTCompoundStatement;
}
protected boolean isFuncExitStatement(IASTStatement statement) {

Back to the top