| Summary: | [fp] "No return, in function returning non-void" in do/while loop | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Alastair D'Silva <eclipse> |
| 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, xcomart, yevshif, zeratul976 |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Not fixed in Kepler CDT 8.2.1
Exactly same issue.
Many C coders may uses "do{...}while(0)"
for multi-statement block MACRO and for semicolon ending.
This appears to be fixed by the patch for bug 394521. I think we can close as duplicate. *** This bug has been marked as a duplicate of bug 394521 *** |
Build Identifier: I20110613-1736 "No return, in function returning non-void" is triggered in do/while loops. Since the do loop always executes at least once, it is valid to return within it. Reproducible: Always Steps to Reproduce: Create a C file with the following function int test () { do { return 1; } while (0); }