Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344187 - Bogus "No return, in function returning non-void"
Summary: Bogus "No return, in function returning non-void"
Status: CLOSED DUPLICATE of bug 343767
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 15:33 EDT by Sergey Prigogin CLA
Modified: 2011-04-28 19:02 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2011-04-28 15:33:51 EDT
The following code triggers a bogus warning "No return, in function returning non-void":

int test() {
  if (true) {
    return 0;
  } else {
    return 1;
  }
}
Comment 1 Marc-André Laperle CLA 2011-04-28 19:02:54 EDT

*** This bug has been marked as a duplicate of bug 343767 ***