![]() |
![]() |
0745 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-6.6.6.4 The return Statement - Semantics | ||||||
This return statement has no return expression but the function has been defined with a non-void return type. The value returned will be undefined. For example:
/*PRQA S 2017,3408 ++*/
extern float foo(void)
{
/* ... */
return; /* Messages 0745 and 1325 */
}
N.B. Messages 0745 and 1325 are functionally identical
MISRA-C:2004 Rules applicable to message 0745:
| Rule 1.2 (Required) | No reliance shall be placed on undefined or unspecified behaviour. |
| Rule 16.8 (Required) | All exit paths from a function with non-void return type shall have an explicit return statement with an expression. |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |