| Summary: | False positive for No return, in function returning non-void | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Dmitry Smirnov <divis1969> |
| Component: | cdt-codan | Assignee: | CDT Codan Inbox <cdt-codan-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, yevshif, zeratul976 |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Technically it is same as Bug 359202. Error reported in dead code. Duplicate of bug 348386. *** This bug has been marked as a duplicate of bug 348386 *** |
The following code produces the warning. This seems to be invalid. The problem is related to the semicolon ending the block of else. There is no warning if semicolon is missed. int test1( int a ) { if( a == 1 ) return 1; else { return 2; }; }