Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343767 - [fp] 'No return' warning when return in both if and else
Summary: [fp] 'No return' warning when return in both if and else
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
: 344187 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-25 15:17 EDT by Marc-André Laperle CLA
Modified: 2011-05-01 17:23 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 Marc-André Laperle CLA 2011-04-25 15:17:54 EDT
Using CDT 8.0.0.201104250856

Example:

int bar(int foo) // Warning : No return, in function returning non-void
{
    if(foo)
        return 0;
    else
        return 0;
}
Comment 1 Marc-André Laperle CLA 2011-04-28 19:02:54 EDT
*** Bug 344187 has been marked as a duplicate of this bug. ***
Comment 2 Elena Laskavaia CLA 2011-05-01 17:15:04 EDT
fixed