![]() |
![]() |
2889 | ![]() |
||||
![]() | |||||||
| Control flow | |||||||
This function returns in more than one place. According to structured programming principles, a function should only contain a single exit point. Note that one of the return paths referred to in this message may be an implicit "return;" statement at the end of the function. For example:
/*PRQA S 2006,2017,3120,3227,3408 ++*/
extern int foo(int n) /* 2889 */
{
if (n > 10)
{
return 0;
}
return n;
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |