![]() |
![]() |
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:2012 Rules applicable to message 0745:
| Rule-1.3 (Required) | There shall be no occurrence of undefined or critical unspecified behaviour |
| Rule-17.4 (Mandatory) | 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:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |