![]() |
![]() |
2015 | ![]() |
||||
![]() | |||||||
| Control flow | |||||||
A statement label has been used. Labels are harmless in themselves but they are usually used in conjunction with goto statements which execute unstructured jumps. Their use in this context is usually discouraged. Message 2015 is not generated for case or default labels. For example:
/*PRQA S 2017,2201,2461,3227,3408,3416,3442,3447,3602 ++*/
extern volatile int n;
extern int ef(void);
extern int foo(int m)
{
int i;
int r = 0;
while (n > 0)
{
for (i = 0; i < m; ++i)
{
r = ef();
if (r < 0)
{
goto E; /* Message 2001 */
}
}
}
E: return r; /* Message 2015 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |